Phpfox_Mail

Description

Email Driver Layer Our email loads a 3rd party email class that usually has support for both sendmail and smtp.

Example:

  1.  Phpfox::getLib('mail')->to('foo@bar.com')
  2.          ->subject('Test Subject')
  3.          ->message('Test Message')
  4.          ->send();

  • author: Raymond Benc
  • version: $Id: mail.class.php 1687 2010-07-22 03:13:27Z Raymond_Benc $
  • copyright: [PHPFOX_COPYRIGHT]

Located in /include/library/phpfox/mail/mail.class.php (line 27)


	
			
Variable Summary
Method Summary
 Phpfox_Mail __construct ([string $sMethod = null])
 object Returns aUser (array $aUser)
 boolean checkEmail (mixed $mEmail)
 object Returns fromEmail (string $sFromEmail)
 object Returns fromName (string $sFromName)
 object Returns message (mixed $aMessage)
 object Returns messageHeader (bool $bMessageHeader)
 object Returns messagePlain (mixed $aMessage)
 object Returns notification (string $sNotification)
 boolean send ([ $bDoCheck = false])
 object Returns sendToSelf (bool $bSendToSelf)
 object Returns subject (mixed $aSubject)
 object Returns test (array $aVals)
 object Returns to (mixed $mTo)
 void _cache ( $sEmail,  $sSubject,  $sTexPlain,  $sTextHtml,  $sFromName,  $sFromEmail)
 boolean _checkEmail (string $sEmail, [boolean $bDoDnsCheck = false])
Variables
mixed $_aMessage = null (line 104)

ARRAY of loading a phrase or STRING of we are passing the message directly.

  • access: private
mixed $_aMessagePlain = null (line 83)

ARRAY of loading a phrase or STRING of we are passing the message directly.

  • access: private
mixed $_aSubject = null (line 48)

ARRAY if loading a phrase or STRING if we are passing a subject.

  • access: private
array $_aUsers = null (line 76)

ARRAY of users to email and their information.

  • access: private
bool $_bMessageHeader = true (line 97)

Controlls if we should include the default header in the message. Default is TRUE.

  • access: private
bool $_bSendToSelf = false (line 90)

TRUE to send the message to ourself and FALSE to not.

  • access: private
mixed $_mTo = null (line 41)

STRING or ARRAY of emails or users to send the emai to.

  • access: private
object $_oMail = null (line 34)

Object of the 3rd party library we are using to send the actual image.

  • access: private
string $_sFromEmail = null (line 62)

The email of the person sending the email.

  • access: private
string $_sFromName = null (line 55)

The name of the person sending the email.

  • access: private
string $_sNotification = null (line 69)

Notification ID to be used to check if a user has privacy settings on receiving an email.

  • access: private
Methods
Constructor __construct (line 111)

Class constructor that loads a specific method of sending emails (sendmail or smtp)

  • access: public
Phpfox_Mail __construct ([string $sMethod = null])
  • string $sMethod: Method to send an email (sendmail or smtp)
aUser (line 254)

We load users information in our send() method, however you can also load users by passing an array of their information with this method.

  • return: this class.
  • access: public
object Returns aUser (array $aUser)
  • array $aUser: ARRAY of users information.
checkEmail (line 272)

Email address validator based on http://www.linuxjournal.com/article/9585 and RFC 2821 Uses recursion for arrays

  • return: true if all valid
  • access: public
boolean checkEmail (mixed $mEmail)
  • mixed $mEmail: array|string
fromEmail (line 188)

Email of the person sending out this email.

  • return: this class.
  • access: public
object Returns fromEmail (string $sFromEmail)
  • string $sFromEmail: Email.
fromName (line 162)

The name of the person sending out the email.

  • return: this class.
  • access: public
object Returns fromName (string $sFromName)
  • string $sFromName: Persons name.
message (line 214)

Message of the email.

  • return: this class.
  • access: public
object Returns message (mixed $aMessage)
  • mixed $aMessage: ARRAY of loading a phrase or STRING of we are passing the message directly.
messageHeader (line 227)

Identify if we should load the message header we include by default.

  • return: this class.
  • access: public
object Returns messageHeader (bool $bMessageHeader)
  • bool $bMessageHeader: Controlls if we should include the default header in the message. Default is TRUE.
messagePlain (line 240)

Message of the email (Plain Text).

  • return: this class.
  • access: public
object Returns messagePlain (mixed $aMessage)
  • mixed $aMessage: ARRAY of loading a phrase or STRING of we are passing the message directly.
notification (line 201)

Notification param for this specific email to check a users privacy settings.

  • return: this class.
  • access: public
object Returns notification (string $sNotification)
  • string $sNotification: Param of the notification.
send (line 300)

Method to send out the email.

Checks: (message || to) === null -> return false; (sFromName || sFromEmail) === null -> getParam(core. (Notification) assumes to is an array of integers, otherwise return false

  • access: public
  • example: example not found
  • example: example not found
boolean send ([ $bDoCheck = false])
  • $bDoCheck
sendToSelf (line 175)

Send a copy to our own email.

  • return: this class.
  • access: public
object Returns sendToSelf (bool $bSendToSelf)
  • bool $bSendToSelf: TRUE will send a copy and FALSE will not.
subject (line 149)

Subject of the email.

  • return: this class.
  • access: public
object Returns subject (mixed $aSubject)
  • mixed $aSubject: ARRAY if loading a phrase or STRING if we are passing a subject.
test (line 122)

Run a test if we are able to send out an email using the default method being loaded.

  • return: this class.
  • access: public
object Returns test (array $aVals)
  • array $aVals: ARRAY of values to test.
to (line 136)

Identify who this email will be sent to. Can be an actual email or a user ID or an array of emails or user IDs.

  • return: this class.
  • access: public
object Returns to (mixed $mTo)
  • mixed $mTo: ARRAY of emails/users or STRING of email/user
_cache (line 523)
  • access: private
void _cache ( $sEmail,  $sSubject,  $sTexPlain,  $sTextHtml,  $sFromName,  $sFromEmail)
  • $sEmail
  • $sSubject
  • $sTexPlain
  • $sTextHtml
  • $sFromName
  • $sFromEmail
_checkEmail (line 537)

Checks to validate an email.

  • access: private
boolean _checkEmail (string $sEmail, [boolean $bDoDnsCheck = false])
  • string $sEmail: email to check
  • boolean $bDoDnsCheck: http://php.net/checkdnsrr check for domain name, this could slow down the function so use wisely

Documentation generated on Tue, 28 Sep 2010 10:36:41 +0200 by phpDocumentor 1.4.0a2