Phang  2.1
 All Classes Files Functions Variables Pages
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes
Abstract_Email Class Reference

Helper class to send e-mails. More...

Inheritance diagram for Abstract_Email:
Base Email

List of all members.

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)

Detailed Description

Helper class to send e-mails.

Must be implemented as text/html e-mail


Constructor & Destructor Documentation

Abstract_Email::__construct (   $arguments = array())

Class constructor.

Sets initial parameters if provided.

Parameters:
$argumentssee $optional_arguments

Member Function Documentation

Abstract_Email::add_header (   $key,
  $value 
)

Add a header.

Parameters:
$keyheader key name, e.g. 'from' - it will automatically be set to lower case
$valueheader value, e.g. 'rachel@hotmail.com'
Abstract_Email::add_recipient (   $email,
  $name = '' 
)

Add a recipient.

Parameters:
$emailemail address - it will automatically be set to lower case
$namerecipient's name
Abstract_Email::remove_header (   $key)

Remove a header.

Parameters:
$keyname of header key to remove
Abstract_Email::remove_recipient (   $email)

Remove a recipient.

Parameters:
$emailemail address to remove
Abstract_Email::send ( )

Send the email.

Creates the from address, recipients string and header string from member data


The documentation for this class was generated from the following file: