Class SGL_Emailer2

Description

Emailer class version 2.

Located in /SGL/Emailer2.php (line 14)


	
			
Method Summary
 static mixed cleanMailInjection (mixed $aHeaders)
 static object &factory ()
 static string formatAddress (string $email, string $fullName)
 static SGL_Emailer_Queue &queueSingleton ([array $aOpts = array()])
 static boolean send (array $aDeliveryOpts, array $aTplOpts, [array $aQueueOpts = array()])
Methods
static cleanMailInjection (line 195)

Takes a string or an associative array of mail headers with each key representing a header's name and a value representing a header's value. The function removes every additional header from each value to prevent mail injection attacks.

mixed cleanMailInjection (mixed $aHeaders)
  • mixed $aHeaders
static factory (line 124)

PEAR::Mail::factory() wrapper.

  • access: public
object &factory ()
static formatAddress (line 175)
  • todo: replace isCyrillic() check to isMultiByte()
  • access: public
string formatAddress (string $email, string $fullName)
  • string $email
  • string $fullName
static queueSingleton (line 105)

Returns SGL_Emailer_Queue instance.

  • access: public
SGL_Emailer_Queue &queueSingleton ([array $aOpts = array()])
  • array $aOpts
static send (line 55)

Creates email and sends it via one of the backends or pushes created email to queue for later use.

  • access: public
boolean send (array $aDeliveryOpts, array $aTplOpts, [array $aQueueOpts = array()])
  • array $aDeliveryOpts: obligatory keys * toEmail - email of recipient * toRealName - name of recipient * fromEmail - email of sender * fromRealName - name of sender * subject - email subject possible keys * replyTo - email of reply to address * cc - email to send copy to * bcc - email to send hidden copy to * attachment - fullpath to file or files (array if many)
  • array $aTplOpts: obligatory keys: * mode (by default: SGL_Emailer_Builder::MODE_HTML_AND_TEXT) * htmlTemplate * moduleName (for htmlTemplate only) * textTemplate * rawText * rawHtml default keys (can be overwritten): * siteUrl * siteName * crlf
  • array $aQueueOpts: possible keys: * sendDelay * groupId * userId * batchId

Documentation generated on Tue, 23 Feb 2010 18:14:30 +0000 by phpDocumentor 1.4.3