[ Index ]

PHP Cross Reference of MantisBT

title

Body

[close]

/core/ -> email_api.php (summary)

Email API

Copyright: Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
Copyright: Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net
File Size: 1462 lines (51 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 39 functions

  email_regex_simple()
  email_is_valid()
  email_ensure_valid()
  email_is_disposable()
  email_ensure_not_disposable()
  email_notify_flag()
  email_collect_recipients()
  email_signup()
  email_send_confirm_hash_url()
  email_notify_new_account()
  email_generic()
  email_monitor_added()
  email_relationship_added()
  email_relationship_deleted()
  email_relationship_child_resolved()
  email_relationship_child_closed()
  email_relationship_child_resolved_closed()
  email_sponsorship_added()
  email_sponsorship_updated()
  email_sponsorship_deleted()
  email_new_bug()
  email_bugnote_add()
  email_resolved()
  email_close()
  email_reopen()
  email_assign()
  email_bug_deleted()
  email_store()
  email_send_all()
  email_send()
  email_smtp_close()
  email_build_subject()
  make_lf_crlf()
  email_append_domain()
  email_bug_reminder()
  email_bug_info_to_one_user()
  email_format_bug_message()
  email_format_attribute()
  email_build_visible_bug_data()

Functions
Functions that are not part of a class:

email_regex_simple()   X-Ref
Use a simple perl regex for valid email addresses.  This is not a complete regex,
as it does not cover quoted addresses or domain literals, but it is simple and
covers the vast majority of all email addresses without being overly complex.

return: string

email_is_valid( $p_email )   X-Ref
check to see that the format is valid and that the mx record exists

param: string $p_email
return: bool

email_ensure_valid( $p_email )   X-Ref
Check if the email address is valid
trigger an ERROR if it isn't

param: string $p_email
return: null

email_is_disposable( $p_email )   X-Ref
Check if the email address is disposable

param: string $p_email
return: bool

email_ensure_not_disposable( $p_email )   X-Ref
Check if the email address is disposable
trigger an ERROR if it isn't

param: string $p_email
return: null

email_notify_flag( $action, $flag )   X-Ref
email_notify_flag
Get the value associated with the specific action and flag.
For example, you can get the value associated with notifying "admin"
on action "new", i.e. notify administrators on new bugs which can be
ON or OFF.

param: string $action
param: string $flag
return: int

email_collect_recipients( $p_bug_id, $p_notify_type, $p_extra_user_ids_to_email = array()   X-Ref

param: int $p_bug_id
param: string $p_notify_type
param: array $p_extra_user_ids_to_email
return: array

email_signup( $p_user_id, $p_password, $p_confirm_hash, $p_admin_name = '' )   X-Ref
Send password to user

param: int $p_user_id
param: string $p_password
param: string $p_confirm_hash
param: string $p_admin_name
return: null

email_send_confirm_hash_url( $p_user_id, $p_confirm_hash )   X-Ref
Send confirm_hash url to user forgets the password

param: int $p_user_id
param: string $p_confirm_hash
return: null

email_notify_new_account( $p_username, $p_email )   X-Ref
notify the selected group a new user has signup

param: string $p_username
param: string $p_email
return: null

email_generic( $p_bug_id, $p_notify_type, $p_message_id = null, $p_header_optional_params = null, $p_extra_user_ids_to_email = array()   X-Ref
send a generic email
$p_notify_type: use check who she get notified of such event.
$p_message_id: message id to be translated and included at the top of the email message.
Return false if it were problems sending email * @param string

param: int $p_bug_id
param: string $p_notify_type
param: int $p_message_id
param: array $p_header_optional_params = null
param: array $p_extra_user_ids_to_email
return: bool

email_monitor_added( $p_bug_id, $p_user_id )   X-Ref
Send notices that a user is now monitoring the bug.  Typically this will only be sent when the added
user is not the logged in user.  This is assuming that receive own notifications is OFF (default).

param: int $p_bug_id
param: int $p_user_id
return: null

email_relationship_added( $p_bug_id, $p_related_bug_id, $p_rel_type )   X-Ref
send notices when a relationship is ADDED

param: int $p_bug_id
param: int $p_related_bug_id
param: int $p_rel_type
return: null

email_relationship_deleted( $p_bug_id, $p_related_bug_id, $p_rel_type )   X-Ref
send notices when a relationship is DELETED

param: int $p_bug_id
param: int $p_related_bug_id
param: int $p_rel_type
return: null

email_relationship_child_resolved( $p_bug_id )   X-Ref
send notices to all the handlers of the parent bugs when a child bug is RESOLVED

param: int $p_bug_id
return: null

email_relationship_child_closed( $p_bug_id )   X-Ref
send notices to all the handlers of the parent bugs when a child bug is CLOSED

param: int $p_bug_id
return: null

email_relationship_child_resolved_closed( $p_bug_id, $p_message_id )   X-Ref
send notices to all the handlers of the parent bugs still open when a child bug is resolved/closed

param: int $p_bug_id
param: int $p_message_id
return: null

email_sponsorship_added( $p_bug_id )   X-Ref
send notices when a bug is sponsored

param: int $p_bug_id
return: null

email_sponsorship_updated( $p_bug_id )   X-Ref
send notices when a sponsorship is modified

param: int $p_bug_id
return: null

email_sponsorship_deleted( $p_bug_id )   X-Ref
send notices when a sponsorship is deleted

param: int $p_bug_id
return: null

email_new_bug( $p_bug_id )   X-Ref
send notices when a new bug is added

param: int $p_bug_id
return: null

email_bugnote_add( $p_bug_id )   X-Ref
send notices when a new bugnote

param: int $p_bug_id
return: null

email_resolved( $p_bug_id )   X-Ref
send notices when a bug is RESOLVED

param: int $p_bug_id
return: null

email_close( $p_bug_id )   X-Ref
send notices when a bug is CLOSED

param: int $p_bug_id
return: null

email_reopen( $p_bug_id )   X-Ref
send notices when a bug is REOPENED

param: int $p_bug_id
return: null

email_assign( $p_bug_id )   X-Ref
send notices when a bug is ASSIGNED

param: int $p_bug_id
return: null

email_bug_deleted( $p_bug_id )   X-Ref
send notices when a bug is DELETED

param: int $p_bug_id
return: null

email_store( $p_recipient, $p_subject, $p_message, $p_headers = null )   X-Ref
Store email in queue for sending

param: string $p_recipient
param: string $p_subject
param: string $p_message
param: array $p_headers
return: int

email_send_all($p_delete_on_failure = false)   X-Ref
This function sends all the emails that are stored in the queue.  If a failure occurs, then the
function exists.  This function will be called after storing emails in case of synchronous
emails, or will be called from a cronjob in case of asynchronous emails.

param: bool $p_delete_on_failure indicates whether to remove email from queue on failure (default false)
return: null

email_send( $p_email_data )   X-Ref
This function sends an email message based on the supplied email data.

param: EmailData $p_email_data
return: bool

email_smtp_close()   X-Ref
closes opened kept alive SMTP connection (if it was opened)

param: string
return: null

email_build_subject( $p_bug_id )   X-Ref
formats the subject correctly
we include the project name, bug id, and summary.

param: int $p_bug_id
return: null

make_lf_crlf( $p_string )   X-Ref
clean up LF to CRLF

param: string $p_string
return: null

email_append_domain( $p_email )   X-Ref
Appends an email domain to the specified email address if email is
not empty, it doesn't already have a domain part and if a
limit_email_domain is configured.

Check limit_email_domain option and append the domain name if it is set
returns: The email address with the appended domain (if applicable).
param: string $p_email The email address to append the domain to.

email_bug_reminder( $p_recipients, $p_bug_id, $p_message )   X-Ref
Send a bug reminder to each of the given user, or to each user if the first parameter is an array
return an array of usernames to which the reminder was successfully sent

param: array $p_recipients
param: int $p_bug_id
param: string $p_message
return: null

email_bug_info_to_one_user( $p_visible_bug_data, $p_message_id, $p_project_id, $p_user_id, $p_header_optional_params = null )   X-Ref
Send bug info to given user
return true on success

param: array $p_visible_bug_data
param: string $p_message_id
param: int $p_project_id
param: int $p_user_id
param: array $p_header_optional_params
return: bool

email_format_bug_message( $p_visible_bug_data )   X-Ref
Build the bug info part of the message

param: array $p_visible_bug_data
return: string

email_format_attribute( $p_visible_bug_data, $attribute_id )   X-Ref
if $p_visible_bug_data contains specified attribute the function
returns concatenated translated attribute name and original
attribute value. Else return empty string.

param: array $p_visible_bug_data
param: string $p_attribute_id
return: string

email_build_visible_bug_data( $p_user_id, $p_bug_id, $p_message_id )   X-Ref
Build the bug raw data visible for specified user to be translated and sent by email to the user
(Filter the bug data according to user access level)
return array with bug data. See usage in email_format_bug_message(...)

param: int $p_user_id
param: int $p_bug_id
param: string $p_message_id
return: array



Generated: Thu Jul 28 15:48:31 2011 Cross-referenced by PHPXref 0.7