## iPhorm_SuccessHandler_Email

Description

Located in /iPhorm/SuccessHandler/Email.php (line 5)

    iPhorm_SuccessHandler_Abstract
       |
       --iPhorm_SuccessHandler_Email

Variable Summary
array $_attachmentElements
array $_autoReply
string $_fromAddress
array $_recipients
string $_subject
Method Summary
iPhorm_SuccessHandler_Email __construct (iPhorm $form)
void addAttachmentElement (iPhorm_Element_File $element)
void addRecipient (string $recipient)
void addRecipients (array $recipients)
void clearRecipients ()
array getAttachmentElements ()
string getFromAddress ()
string getRawSubject ()
array getRecipients ()
string getSubject ()
void run ()
void setAutoReply (string $subject, string $htmlFile, string $plainTextFile)
void setFromAddress ($address $address)
void setRecipients (array|string $recipients)
void setSubject (string $subject)
string _getEmailBodyHtml ()
string _getEmailBodyPlain ()
string _getPlaceholderValue (string $matches)
string _replacePlaceholderValues (string $string)
Variables
array $_attachmentElements = array() (line 27)

Email attachment elements, an array of iPhorm_Element_File's

- access: protected

array $_autoReply = array() (line 42)

The autoreply information

- access: protected

string $_fromAddress (line 35)

Email from address, if set will override using the form submitted email

- access: protected

array $_recipients = array() (line 12)

The recipients of the email

- access: protected

string $_subject = 'Contact enquiry from your website' (line 19)

The email subject

- access: protected

#### Inherited Variables

Inherited from iPhorm_SuccessHandler_Abstract

> iPhorm_SuccessHandler_Abstract::$_charset
> iPhorm_SuccessHandler_Abstract::$_form

Methods
Constructor __construct (line 47)

Class constructor

- access: public

iPhorm_SuccessHandler_Email __construct (iPhorm $form)

- iPhorm $form

Redefinition of:

iPhorm_SuccessHandler_Abstract::__construct()
  Class constructor

addAttachmentElement (line 146)

Add an attachment element, the uploaded file will be added as an attachment to the email

- access: public

void addAttachmentElement (iPhorm_Element_File $element)

- iPhorm_Element_File $element

addRecipient (line 69)

Add a single recipient

- access: public

void addRecipient (string $recipient)

- string $recipient: An email address of the recipient

addRecipients (line 79)

Add multiple recipients

- access: public

void addRecipients (array $recipients)

- array $recipients: The array of recipients or a single email address string

clearRecipients (line 93)

Removes all recipients

- access: public

void clearRecipients ()
getAttachmentElements (line 156)

Get all the attachment elements

- access: public

array getAttachmentElements ()
getFromAddress (line 176)

Get the from address

- return: The email address
- access: public

string getFromAddress ()
getRawSubject (line 123)

Get the subject

- access: public

string getRawSubject ()
getRecipients (line 103)

Get the recipients

- return: The array of recipient email addresses
- access: public

array getRecipients ()
getSubject (line 133)

Get the subject with placeholder values replaced

- access: public

string getSubject ()
run (line 200)

Sends the email to the set recipients

- access: public

void run ()
setAutoReply (line 188)

Sets the autoreply information to send an autoreply to the form user

- access: public

void setAutoReply (string $subject, string $htmlFile, string $plainTextFile)

- string $subject: The email subject
- string $htmlFile: The name of the html email content file
- string $plainTextFile: The name of the plain text email content file

setFromAddress (line 166)

Set the from address

- access: public

void setFromAddress ($address $address)

- $address $address: string The email address

setRecipients (line 58)

Set the recipients of the enquiry

- access: public

void setRecipients (array|string $recipients)

- array|string $recipients: The array of recipients or a single email address string

setSubject (line 113)

Set the subject

- access: public

void setSubject (string $subject)

- string $subject

_getEmailBodyHtml (line 302)

Get the email body in HTML. Retrieves the contents of email-html.php in the iPhorm root folder

- return: The email body in HTML
- access: protected

string _getEmailBodyHtml ()
_getEmailBodyPlain (line 315)

Get the email body in plain text. Retrieves the contents of email-plain.php in the iPhorm root folder

- return: The email body in plain text
- access: protected

string _getEmailBodyPlain ()
_getPlaceholderValue (line 340)

Get the form value of a single placeholder

- return: The the form value
- access: protected

string _getPlaceholderValue (string $matches)

- string $matches

_replacePlaceholderValues (line 329)

Replace all placeholder values in a string with their form value equivalents

- access: protected

string _replacePlaceholderValues (string $string)

- string $string

#### Inherited Methods

Inherited From iPhorm_SuccessHandler_Abstract

> iPhorm_SuccessHandler_Abstract::__construct()
> iPhorm_SuccessHandler_Abstract::getForm()
> iPhorm_SuccessHandler_Abstract::setForm()

Documentation generated on Thu, 24 Feb 2011 22:19:37 +0000 by phpDocumentor 1.4.3