Helper class to send e-mails. More...
Public Member Functions | |
| __construct ($arguments=array()) | |
| Class constructor. | |
| add_recipient ($email, $name='') | |
| Add a recipient. | |
| remove_recipient ($email) | |
| Remove a recipient. | |
| add_header ($key, $value) | |
| Add a header. | |
| remove_header ($key) | |
| Remove a header. | |
| send () | |
| Send the email. | |
Public Member Functions inherited from Base | |
| __call ($function, $params) | |
| The 'magic' call method will get/set for us invoked when the interpreter can not find a method the user is asking for. | |
| set_parameters ($arguments) | |
| Set variables from an array to member fields requires $this->optional_arguments or $this->required_arguments to have been set by the subclass. | |
Protected Attributes | |
| $to = '' | |
| Whom to send it to, e.g. dave@google.com, tim@yahoo.com <Tim Stubbs> | |
| $recipients = array() | |
| Array email => name pairs, e.g. array('geoffrey@humphriesenterprises.com'=>'Geoffrey Humphries', ...) | |
| $from_email = '' | |
| From e-mail. | |
| $from_name = '' | |
| From name. | |
| $subject = '' | |
| Subject. | |
| $message = '' | |
| Message. | |
| $headers = array() | |
| Additional headers, e.g. array('from'=>'rachel@hotmail.com');. | |
| $optional_arguments = array('to', 'from', 'from_email', 'from_name', 'subject', 'message', 'headers') | |
| Array of variables that can be set in the constructor. | |
Protected Attributes inherited from Base | |
| $required_arguments = array() | |
| Array of options that need to be set to variables. | |
Private Member Functions | |
| set_recipients_string () | |
| Sets the recipients list string. | |
| set_from () | |
| Creates the from address string. | |
| set_header_string () | |
| Creates the headers string. | |
Private Attributes | |
| $recipients_string = '' | |
| Recipients as a string (generated internally) | |
| $header_string = '' | |
| Header string (generated internally) | |
Helper class to send e-mails.
Must be implemented as text/html e-mail
| Abstract_Email::__construct | ( | $arguments = array() | ) |
Class constructor.
Sets initial parameters if provided.
| $arguments | see $optional_arguments |
| Abstract_Email::add_header | ( | $key, | |
| $value | |||
| ) |
Add a header.
| $key | header key name, e.g. 'from' - it will automatically be set to lower case |
| $value | header value, e.g. 'rachel@hotmail.com' |
| Abstract_Email::add_recipient | ( | $email, | |
$name = '' |
|||
| ) |
Add a recipient.
| email address - it will automatically be set to lower case | |
| $name | recipient's name |
| Abstract_Email::remove_header | ( | $key | ) |
Remove a header.
| $key | name of header key to remove |
| Abstract_Email::remove_recipient | ( | ) |
Remove a recipient.
| email address to remove |
| Abstract_Email::send | ( | ) |
Send the email.
Creates the from address, recipients string and header string from member data
1.8.1.1