Mailer Class Reference

Creates and sends an email message. More...

Inheritance diagram for Mailer:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 addAttachment ($path, $name, $type="octet-stream")
 Add an attachment to the email.
 addRecipient ($recipient)
 Add a recipient to the email.
 clearRecipients ()
 Clear the list of recipients.
 sendMail ()
 Send the email message.
 setDevRecipient ($email)
 Set the email address that emails will be sent to during testing.
 setFrom ($from)
 Set the from address.
 setMessage ($message)
 Set the message body of the email.
 setReplyTo ($address)
 Set the reply-to address.
 setSubject ($subject)
 Set the subject of the email.


Detailed Description

Creates and sends an email message.

Author:
Ismael (itorres@shodor.org)

Sandy (sbrady@shodor.org) adding attachment support


Member Function Documentation

Mailer::addAttachment ( path,
name,
type = "octet-stream" 
)

Add an attachment to the email.

Parameters:
$path [string]: The path to the file we are attaching
$name [string]: The name of the file.
$type [string]: (optional) The MIME type for the file. If none is set it will default to octet-stream.
Returns:
[boolean]: True on success, false on failure;

Mailer::addRecipient ( recipient  ) 

Add a recipient to the email.

Parameters:
$recipient [mixed]: An email address of a recipient, or an array of email addresses

Mailer::sendMail (  ) 

Send the email message.

Sends a message containing the subject, message body, reply-to, etc., to all added recipients (call processRecipients() to generate a string version of the recipient list)

Mailer::setDevRecipient ( email  ) 

Set the email address that emails will be sent to during testing.

<<<<<<< Updated upstream

Parameters:
$email [string]: The email that collects emails sent by the dev server during testing

Mailer::setFrom ( from  ) 

Set the from address.

Parameters:
$from [string]: The email address from which the email will (appear to) be sent

Mailer::setMessage ( message  ) 

Set the message body of the email.

======= >>>>>>> Stashed changes

Parameters:
$message [string]: The message body of the email

Mailer::setReplyTo ( address  ) 

Set the reply-to address.

Parameters:
$address [string]: The reply-to email address for the email

Mailer::setSubject ( subject  ) 

Set the subject of the email.

Parameters:
$subject [string]: The subject of the email


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

Generated on Wed Nov 24 02:02:26 2010 for Common by  doxygen 1.5.6