[ class tree: PHPMailer ] [ index: PHPMailer ] [ all elements ]

Class: PHPMailer

Source Location: /zp-extensions/PHPMailer/class.phpmailer.php

Class PHPMailer

Class Overview

PHPMailer - PHP email transport class

NOTE: Requires PHP version 5 or later

Located in /zp-extensions/PHPMailer/class.phpmailer.php [line 43]



		
				Author(s):
		
  • Marcus Bointon
  • Andy Prevost
Information Tags:
Version:  $Id: class.phpmailer.php 447 2009-05-25 01:36:38Z codeworxtech $
Copyright:  2004 - 2009 Andy Prevost
License:  GNU Lesser General Public License

Properties

Methods

[ Top ]
Property Summary
string   $action_function   Callback Action function name
string   $AltBody   Sets the text-only body of the message. This automatically sets the email to multipart/alternative. This body can be read by mail clients that do not have HTML email capability such as mutt. Clients that can read HTML will view the normal Body.
string   $Body   Sets the Body of the message. This can be either an HTML or text body.
string   $CharSet   Sets the CharSet of the message.
string   $ConfirmReadingTo   Sets the email address that a reading confirmation will be sent.
string   $ContentType   Sets the Content-type of the message.
string   $DKIM_domain   Used with DKIM DNS Resource Record
string   $DKIM_identity   Used with DKIM DNS Resource Record
string   $DKIM_private   Used with DKIM DNS Resource Record
string   $DKIM_selector   Used with DKIM DNS Resource Record
string   $Encoding   Sets the Encoding of the message. Options for this are "8bit", "7bit", "binary", "base64", and "quoted-printable".
string   $ErrorInfo   Holds the most recent mailer error message.
string   $From   Sets the From email address for the message.
string   $FromName   Sets the From name of the message.
string   $Helo   Sets the SMTP HELO of the message (Default is $Hostname).
string   $Host   Sets the SMTP hosts. All hosts must be separated by a semicolon. You can also specify a different port for each host by using this format: [hostname:port] (e.g. "smtp1.example.com:25;smtp2.example.com").
string   $Hostname   Sets the hostname to use in Message-Id and Received headers and as default HELO string. If empty, the value returned by SERVER_NAME is used or 'localhost.localdomain'.
mixed   $language  
string   $LE   Provides the ability to change the line ending
string   $Mailer   Method to send mail: ("mail", "sendmail", or "smtp").
string   $MessageID   Sets the message ID to be used in the Message-Id header.
string   $Password   Sets SMTP password.
string   $PluginDir   Path to PHPMailer plugins. Useful if the SMTP class is in a different directory than the PHP include path.
int   $Port   Sets the default SMTP server port.
int   $Priority   Email priority (1 = High, 3 = Normal, 5 = low).
string   $Sender   Sets the Sender email (Return-Path) of the message. If not empty, will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.
string   $Sendmail   Sets the path of the sendmail program.
bool   $SingleTo   Provides the ability to have the TO field process individual
bool   $SingleToArray   If SingleTo is true, this provides the array to hold the email addresses
bool   $SMTPAuth   Sets SMTP authentication. Utilizes the Username and Password variables.
bool   $SMTPDebug   Sets SMTP class debugging on or off.
bool   $SMTPKeepAlive   Prevents the SMTP connection from being closed after each mail sending. If this is set to true then to close the connection requires an explicit call to SmtpClose().
string   $SMTPSecure   Sets connection prefix.
string   $Subject   Sets the Subject of the message.
int   $Timeout   Sets the SMTP server timeout in seconds.
string   $Username   Sets SMTP username.
string   $Version   Sets the PHPMailer Version number
int   $WordWrap   Sets word wrapping on the body of the message to a given number of characters.

[ Top ]
Method Summary
static string   RFCDate()   Returns the proper RFC 822 formatted date.
static boolean   ValidateAddress()   Check that a string looks roughly like an email address should
static string   _mime_types()   Gets the MIME type of the embedded or inline image
PHPMailer   __construct()   Constructor
boolean   AddAddress()   Adds a "To" address.
bool   AddAttachment()   Adds an attachment from a path on the filesystem.
boolean   AddBCC()   Adds a "Bcc" address.
boolean   AddCC()   Adds a "Cc" address.
void   AddCustomHeader()   Adds a custom header.
bool   AddEmbeddedImage()   Adds an embedded attachment. This can include images, sounds, and just about any other document. Make sure to set the $type to an image type. For JPEG images use "image/jpeg" and for GIF images use "image/gif".
string   AddrAppend()   Creates recipient headers.
boolean   AddReplyTo()   Adds a "Reply-to" address.
string   AddrFormat()   Formats an address correctly.
void   AddStringAttachment()   Adds a string or binary attachment (non-filesystem) to the list.
string   Base64EncodeWrapMB()   Correctly encodes and wraps long multibyte strings for mail headers without breaking lines within a character.
void   ClearAddresses()   Clears all recipients assigned in the TO array. Returns void.
void   ClearAllRecipients()   Clears all recipients assigned in the TO, CC and BCC array. Returns void.
void   ClearAttachments()   Clears all previously set filesystem, string, and binary attachments. Returns void.
void   ClearBCCs()   Clears all recipients assigned in the BCC array. Returns void.
void   ClearCCs()   Clears all recipients assigned in the CC array. Returns void.
void   ClearCustomHeaders()   Clears all custom headers. Returns void.
void   ClearReplyTos()   Clears all recipients assigned in the ReplyTo array. Returns void.
string   CreateBody()   Assembles the message body. Returns an empty string on failure.
string   CreateHeader()   Assembles message header.
void   DKIM_Add()   Create the DKIM header, body, as new header
void   DKIM_BodyC()   Generate DKIM Canonicalization Body
void   DKIM_HeaderC()   Generate DKIM Canonicalization Header
void   DKIM_QP()   Set the private key file and password to sign the message.
void   DKIM_Sign()   Generate DKIM signature
void   doCallback()  
string   EncodeHeader()   Encode a header string to best (shortest) of Q, B, quoted or none.
string   EncodeQ()   Encode string to q encoding.
string   EncodeQP()   Encode string to RFC2045 (6.7) quoted-printable format
string   EncodeQPphp()   Encode string to quoted-printable.
string   EncodeString()   Encodes string to requested format.
array   GetAttachments()   Return the current array of attachments
string   GetMailMIME()   Returns the message MIME.
array   GetTranslations()   Return the current array of language strings
bool   HasMultiBytes()   Checks if a string contains multibyte characters.
string   HeaderLine()   Returns a formatted header line.
bool   InlineImageExists()   Returns true if an inline attachment is present.
bool   IsError()   Returns true if an error occurred.
void   IsHTML()   Sets message type to HTML.
void   IsMail()   Sets Mailer to send message using PHP mail() function.
void   IsQmail()   Sets Mailer to send message using the qmail MTA.
void   IsSendmail()   Sets Mailer to send message using the $Sendmail program.
void   IsSMTP()   Sets Mailer to send message using SMTP.
bool   MailSend()   Sends mail using the PHP mail() function.
$message   MsgHTML()   Evaluates the message and returns modifications for inline images and backgrounds
string   SecureHeader()   Strips newlines to prevent header injection.
bool   Send()   Creates message and assigns Mailer. If the message is not sent successfully then it returns false. Use the ErrorInfo variable to view description of the error.
bool   SendmailSend()   Sends mail using the $Sendmail program.
void   set()   Set (or reset) Class Objects (variables)
void   SetError()   Adds the error message to the error container.
boolean   SetFrom()   Set the From and FromName properties
void   SetLanguage()   Sets the language for all class error messages.
void   SetWordWrap()   Set the body wrapping.
void   Sign()   Set the private key file and password to sign the message.
void   SmtpClose()   Closes the active SMTP session if one exists.
bool   SmtpConnect()   Initiates a connection to an SMTP server.
bool   SmtpSend()   Sends mail via SMTP using PhpSMTP Returns false if there is a bad MAIL FROM, RCPT, or DATA input.
string   TextLine()   Returns a formatted mail line.
int   UTF8CharBoundary()   Finds last character boundary prior to maxLength in a utf-8 quoted (printable) encoded string.
string   WrapText()   Wraps message for use with mailers that do not automatically perform wrapping and for quoted-printable.

[ Top ]
Properties
string   $action_function = '' [line 297]

Callback Action function name

the function that handles the result of the send email action. Parameters: bool $result result of the send action string $to email address of the recipient string $cc cc email addresses string $bcc bcc email addresses string $subject the subject string $body the email body

API Tags:
Access:  public


[ Top ]
string   $AltBody = '' [line 119]

Sets the text-only body of the message. This automatically sets the email to multipart/alternative. This body can be read by mail clients that do not have HTML email capability such as mutt. Clients that can read HTML will view the normal Body.

API Tags:
Access:  public


[ Top ]
string   $Body = '' [line 110]

Sets the Body of the message. This can be either an HTML or text body.

If HTML then run IsHTML(true).

API Tags:
Access:  public


[ Top ]
string   $CharSet = 'iso-8859-1' [line 59]

Sets the CharSet of the message.

API Tags:
Access:  public


[ Top ]
string   $ConfirmReadingTo = '' [line 151]

Sets the email address that a reading confirmation will be sent.

API Tags:
Access:  public


[ Top ]
string   $ContentType = 'text/plain' [line 65]

Sets the Content-type of the message.

API Tags:
Access:  public


[ Top ]
string   $DKIM_domain = '' [line 277]

Used with DKIM DNS Resource Record

optional, in format of email address 'you@yourdomain.com'

API Tags:
Access:  public


[ Top ]
string   $DKIM_identity = '' [line 270]

Used with DKIM DNS Resource Record

optional, in format of email address 'you@yourdomain.com'

API Tags:
Access:  public


[ Top ]
string   $DKIM_private = '' [line 284]

Used with DKIM DNS Resource Record

optional, in format of email address 'you@yourdomain.com'

API Tags:
Access:  public


[ Top ]
string   $DKIM_selector = 'phpmailer' [line 263]

Used with DKIM DNS Resource Record

API Tags:
Access:  public


[ Top ]
string   $Encoding = '8bit' [line 72]

Sets the Encoding of the message. Options for this are "8bit", "7bit", "binary", "base64", and "quoted-printable".

API Tags:
Access:  public


[ Top ]
string   $ErrorInfo = '' [line 78]

Holds the most recent mailer error message.

API Tags:
Access:  public


[ Top ]
string   $From = 'root@localhost' [line 84]

Sets the From email address for the message.

API Tags:
Access:  public


[ Top ]
string   $FromName = 'Root User' [line 90]

Sets the From name of the message.

API Tags:
Access:  public


[ Top ]
string   $Helo = '' [line 192]

Sets the SMTP HELO of the message (Default is $Hostname).

API Tags:
Access:  public


[ Top ]
string   $Host = 'localhost' [line 180]

Sets the SMTP hosts. All hosts must be separated by a semicolon. You can also specify a different port for each host by using this format: [hostname:port] (e.g. "smtp1.example.com:25;smtp2.example.com").

Hosts will be tried in order.

API Tags:
Access:  public


[ Top ]
string   $Hostname = '' [line 159]

Sets the hostname to use in Message-Id and Received headers and as default HELO string. If empty, the value returned by SERVER_NAME is used or 'localhost.localdomain'.

API Tags:
Access:  public


[ Top ]
mixed   $language = array() [line 319]
API Tags:
Access:  protected


[ Top ]
string   $LE = "\n" [line 257]

Provides the ability to change the line ending

API Tags:
Access:  public


[ Top ]
string   $Mailer = 'mail' [line 132]

Method to send mail: ("mail", "sendmail", or "smtp").

API Tags:
Access:  public


[ Top ]
string   $MessageID = '' [line 166]

Sets the message ID to be used in the Message-Id header.

If empty, a unique id will be generated.

API Tags:
Access:  public


[ Top ]
string   $Password = '' [line 217]

Sets SMTP password.

API Tags:
Access:  public


[ Top ]
string   $PluginDir = '' [line 145]

Path to PHPMailer plugins. Useful if the SMTP class is in a different directory than the PHP include path.

API Tags:
Access:  public


[ Top ]
int   $Port = 25 [line 186]

Sets the default SMTP server port.

API Tags:
Access:  public


[ Top ]
int   $Priority = 3 [line 53]

Email priority (1 = High, 3 = Normal, 5 = low).

API Tags:
Access:  public


[ Top ]
string   $Sender = '' [line 97]

Sets the Sender email (Return-Path) of the message. If not empty, will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.

API Tags:
Access:  public


[ Top ]
string   $Sendmail = '/usr/sbin/sendmail' [line 138]

Sets the path of the sendmail program.

API Tags:
Access:  public


[ Top ]
bool   $SingleTo = false [line 245]

Provides the ability to have the TO field process individual

emails, instead of sending to entire TO addresses

API Tags:
Access:  public


[ Top ]
bool   $SingleToArray = array() [line 251]

If SingleTo is true, this provides the array to hold the email addresses

API Tags:
Access:  public


[ Top ]
bool   $SMTPAuth = false [line 205]

Sets SMTP authentication. Utilizes the Username and Password variables.

API Tags:
Access:  public


[ Top ]
bool   $SMTPDebug = false [line 230]

Sets SMTP class debugging on or off.

API Tags:
Access:  public


[ Top ]
bool   $SMTPKeepAlive = false [line 238]

Prevents the SMTP connection from being closed after each mail sending. If this is set to true then to close the connection requires an explicit call to SmtpClose().

API Tags:
Access:  public


[ Top ]
string   $SMTPSecure = '' [line 199]

Sets connection prefix.

Options are "", "ssl" or "tls"

API Tags:
Access:  public


[ Top ]
string   $Subject = '' [line 103]

Sets the Subject of the message.

API Tags:
Access:  public


[ Top ]
int   $Timeout = 10 [line 224]

Sets the SMTP server timeout in seconds.

This function will not work with the win32 version.

API Tags:
Access:  public


[ Top ]
string   $Username = '' [line 211]

Sets SMTP username.

API Tags:
Access:  public


[ Top ]
string   $Version = '5.1' [line 303]

Sets the PHPMailer Version number

API Tags:
Access:  public


[ Top ]
int   $WordWrap = 0 [line 126]

Sets word wrapping on the body of the message to a given number of characters.

API Tags:
Access:  public


[ Top ]
Methods
static method RFCDate  [line 1923]

  static string RFCDate( )

Returns the proper RFC 822 formatted date.


API Tags:
Access:  public


[ Top ]
static method ValidateAddress  [line 523]

  static boolean ValidateAddress( string $address  )

Check that a string looks roughly like an email address should

Static so it can be used without instantiation Tries to use PHP built-in validator in the filter extension (from PHP 5.2), falls back to a reasonably competent regex validator Conforms approximately to RFC2822

Parameters:
string   $address:  The email address to check

API Tags:
Access:  public

Information Tags:
Link:  Original pattern found here

[ Top ]
static method _mime_types  [line 2040]

  static string _mime_types( [string $ext = '']  )

Gets the MIME type of the embedded or inline image

Parameters:
string   $ext:  File extension

API Tags:
Return:  MIME type of ext
Access:  public


[ Top ]
Constructor __construct  [line 342]

  PHPMailer __construct( [boolean $exceptions = false]  )

Constructor

Parameters:
boolean   $exceptions:  Should we throw external exceptions?

API Tags:
Access:  public


[ Top ]
AddAddress  [line 407]

  boolean AddAddress( string $address, [string $name = '']  )

Adds a "To" address.

Parameters:
string   $address: 
string   $name: 

API Tags:
Return:  true on success, false if address already used
Access:  public


[ Top ]
AddAttachment  [line 1344]

  bool AddAttachment( string $path, [string $name = ''], [string $encoding = 'base64'], [string $type = 'application/octet-stream']  )

Adds an attachment from a path on the filesystem.

Returns false if the file could not be found or accessed.

Parameters:
string   $path:  Path to the attachment.
string   $name:  Overrides the attachment name.
string   $encoding:  File encoding (see $Encoding).
string   $type:  File extension (MIME) type.

API Tags:
Access:  public


[ Top ]
AddBCC  [line 429]

  boolean AddBCC( string $address, [string $name = '']  )

Adds a "Bcc" address.

Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.

Parameters:
string   $address: 
string   $name: 

API Tags:
Return:  true on success, false if address already used
Access:  public


[ Top ]
AddCC  [line 418]

  boolean AddCC( string $address, [string $name = '']  )

Adds a "Cc" address.

Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.

Parameters:
string   $address: 
string   $name: 

API Tags:
Return:  true on success, false if address already used
Access:  public


[ Top ]
AddCustomHeader  [line 1993]

  void AddCustomHeader( $custom_header  )

Adds a custom header.

Parameters:
   $custom_header: 

API Tags:
Access:  public


[ Top ]
AddEmbeddedImage  [line 1782]

  bool AddEmbeddedImage( string $path, string $cid, [string $name = ''], [string $encoding = 'base64'], [string $type = 'application/octet-stream']  )

Adds an embedded attachment. This can include images, sounds, and just about any other document. Make sure to set the $type to an image type. For JPEG images use "image/jpeg" and for GIF images use "image/gif".

Parameters:
string   $path:  Path to the attachment.
string   $cid:  Content ID of the attachment. Use this to identify the Id for accessing the image in an HTML form.
string   $name:  Overrides the attachment name.
string   $encoding:  File encoding (see $Encoding).
string   $type:  File extension (MIME) type.

API Tags:
Access:  public


[ Top ]
AddrAppend  [line 897]

  string AddrAppend( $type, $addr  )

Creates recipient headers.

Parameters:
   $type: 
   $addr: 

API Tags:
Access:  public


[ Top ]
AddReplyTo  [line 439]

  boolean AddReplyTo( string $address, [string $name = '']  )

Adds a "Reply-to" address.

Parameters:
string   $address: 
string   $name: 

API Tags:
Access:  public


[ Top ]
AddrFormat  [line 914]

  string AddrFormat( $addr  )

Formats an address correctly.

Parameters:
   $addr: 

API Tags:
Access:  public


[ Top ]
AddStringAttachment  [line 1755]

  void AddStringAttachment( string $string, string $filename, [string $encoding = 'base64'], [string $type = 'application/octet-stream']  )

Adds a string or binary attachment (non-filesystem) to the list.

This method can be used to attach ascii or binary data, such as a BLOB record from a database.

Parameters:
string   $string:  String attachment data.
string   $filename:  Name of the attachment.
string   $encoding:  File encoding (see $Encoding).
string   $type:  File extension (MIME) type.

API Tags:
Access:  public


[ Top ]
Base64EncodeWrapMB  [line 1599]

  string Base64EncodeWrapMB( string $str  )

Correctly encodes and wraps long multibyte strings for mail headers without breaking lines within a character.

Adapted from a function by paravoid at http://uk.php.net/manual/en/function.mb-encode-mimeheader.php

Parameters:
string   $str:  multi-byte text to wrap encode

API Tags:
Access:  public


[ Top ]
ClearAddresses  [line 1831]

  void ClearAddresses( )

Clears all recipients assigned in the TO array. Returns void.


API Tags:
Access:  public


[ Top ]
ClearAllRecipients  [line 1873]

  void ClearAllRecipients( )

Clears all recipients assigned in the TO, CC and BCC array. Returns void.


API Tags:
Access:  public


[ Top ]
ClearAttachments  [line 1885]

  void ClearAttachments( )

Clears all previously set filesystem, string, and binary attachments. Returns void.


API Tags:
Access:  public


[ Top ]
ClearBCCs  [line 1853]

  void ClearBCCs( )

Clears all recipients assigned in the BCC array. Returns void.


API Tags:
Access:  public


[ Top ]
ClearCCs  [line 1842]

  void ClearCCs( )

Clears all recipients assigned in the CC array. Returns void.


API Tags:
Access:  public


[ Top ]
ClearCustomHeaders  [line 1893]

  void ClearCustomHeaders( )

Clears all custom headers. Returns void.


API Tags:
Access:  public


[ Top ]
ClearReplyTos  [line 1864]

  void ClearReplyTos( )

Clears all recipients assigned in the ReplyTo array. Returns void.


API Tags:
Access:  public


[ Top ]
CreateBody  [line 1190]

  string CreateBody( )

Assembles the message body. Returns an empty string on failure.


API Tags:
Return:  The assembled message body
Access:  public


[ Top ]
CreateHeader  [line 1073]

  string CreateHeader( )

Assembles message header.


API Tags:
Return:  The assembled header
Access:  public


[ Top ]
DKIM_Add  [line 2269]

  void DKIM_Add( string $headers_line, string $subject, string $body  )

Create the DKIM header, body, as new header

Parameters:
string   $headers_line:  Header lines
string   $subject:  Subject
string   $body:  Body

API Tags:
Access:  public


[ Top ]
DKIM_BodyC  [line 2249]

  void DKIM_BodyC( string $body  )

Generate DKIM Canonicalization Body

Parameters:
string   $body:  Message Body

API Tags:
Access:  public


[ Top ]
DKIM_HeaderC  [line 2230]

  void DKIM_HeaderC( string $s  )

Generate DKIM Canonicalization Header

Parameters:
string   $s:  Header

API Tags:
Access:  public


[ Top ]
DKIM_QP  [line 2192]

  void DKIM_QP( $txt, string $key_filename, string $key_pass  )

Set the private key file and password to sign the message.

Parameters:
string   $key_filename:  Parameter File Name
string   $key_pass:  Password for private key
   $txt: 

API Tags:
Access:  public


[ Top ]
DKIM_Sign  [line 2212]

  void DKIM_Sign( string $s  )

Generate DKIM signature

Parameters:
string   $s:  Header

API Tags:
Access:  public


[ Top ]
doCallback  [line 2304]

  void doCallback( $isSent, $to, $cc, $bcc, $subject, $body  )

Parameters:
   $isSent: 
   $to: 
   $cc: 
   $bcc: 
   $subject: 
   $body: 

API Tags:
Access:  protected


[ Top ]
EncodeHeader  [line 1522]

  string EncodeHeader( $str, [ $position = 'text']  )

Encode a header string to best (shortest) of Q, B, quoted or none.

Parameters:
   $str: 
   $position: 

API Tags:
Access:  public


[ Top ]
EncodeQ  [line 1721]

  string EncodeQ( string $str, [string $position = 'text']  )

Encode string to q encoding.

Parameters:
string   $str:  the text to encode
string   $position:  Where the text is going to be used, see the RFC for what that means

API Tags:
Access:  public

Information Tags:
Link:  http://tools.ietf.org/html/rfc2047

[ Top ]
EncodeQP  [line 1692]

  string EncodeQP( string $string, [integer $line_max = 76], [boolean $space_conv = false]  )

Encode string to RFC2045 (6.7) quoted-printable format

Uses a PHP5 stream filter to do the encoding about 64x faster than the old version Also results in same content as you started with after decoding

Parameters:
string   $string:  the text to encode
integer   $line_max:  Number of chars allowed on a line before wrapping
boolean   $space_conv:  Dummy param for compatibility with existing EncodeQP function

API Tags:
See:  PHPMailer::EncodeQPphp()
Access:  public

Information Tags:
Author:  Marcus Bointon

[ Top ]
EncodeQPphp  [line 1639]

  string EncodeQPphp( [ $input = ''], [integer $line_max = 76], [ $space_conv = false], string $string  )

Encode string to quoted-printable.

Only uses standard PHP, slow, but will always work

Parameters:
string   $string:  the text to encode
integer   $line_max:  Number of chars allowed on a line before wrapping
   $input: 
   $space_conv: 

API Tags:
Access:  public


[ Top ]
EncodeString  [line 1491]

  string EncodeString( string $str, [string $encoding = 'base64']  )

Encodes string to requested format.

Returns an empty string on failure.

Parameters:
string   $str:  The text to encode
string   $encoding:  The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable'

API Tags:
Access:  public


[ Top ]
GetAttachments  [line 1382]

  array GetAttachments( )

Return the current array of attachments


API Tags:
Access:  public


[ Top ]
GetMailMIME  [line 1156]

  string GetMailMIME( )

Returns the message MIME.


API Tags:
Access:  public


[ Top ]
GetTranslations  [line 884]

  array GetTranslations( )

Return the current array of language strings


API Tags:
Access:  public


[ Top ]
HasMultiBytes  [line 1583]

  bool HasMultiBytes( string $str  )

Checks if a string contains multibyte characters.

Parameters:
string   $str:  multi-byte text to wrap encode

API Tags:
Access:  public


[ Top ]
HeaderLine  [line 1317]

  string HeaderLine( $name, $value  )

Returns a formatted header line.

Parameters:
   $name: 
   $value: 

API Tags:
Access:  public


[ Top ]
InlineImageExists  [line 1814]

  bool InlineImageExists( )

Returns true if an inline attachment is present.


API Tags:
Access:  public


[ Top ]
IsError  [line 1972]

  bool IsError( )

Returns true if an error occurred.


API Tags:
Access:  public


[ Top ]
IsHTML  [line 351]

  void IsHTML( [bool $ishtml = true]  )

Sets message type to HTML.

Parameters:
bool   $ishtml: 

API Tags:
Access:  public


[ Top ]
IsMail  [line 371]

  void IsMail( )

Sets Mailer to send message using PHP mail() function.


API Tags:
Access:  public


[ Top ]
IsQmail  [line 390]

  void IsQmail( )

Sets Mailer to send message using the qmail MTA.


API Tags:
Access:  public


[ Top ]
IsSendmail  [line 379]

  void IsSendmail( )

Sets Mailer to send message using the $Sendmail program.


API Tags:
Access:  public


[ Top ]
IsSMTP  [line 363]

  void IsSMTP( )

Sets Mailer to send message using SMTP.


API Tags:
Access:  public


[ Top ]
MailSend  [line 644]

  bool MailSend( string $header, string $body  )

Sends mail using the PHP mail() function.

Parameters:
string   $header:  The message headers
string   $body:  The message body

API Tags:
Access:  protected


[ Top ]
MsgHTML  [line 2002]

  $message MsgHTML( $message, [ $basedir = '']  )

Evaluates the message and returns modifications for inline images and backgrounds

Parameters:
   $message: 
   $basedir: 

API Tags:
Access:  public


[ Top ]
SecureHeader  [line 2166]

  string SecureHeader( string $str  )

Strips newlines to prevent header injection.

Parameters:
string   $str:  String

API Tags:
Access:  public


[ Top ]
Send  [line 545]

  bool Send( )

Creates message and assigns Mailer. If the message is not sent successfully then it returns false. Use the ErrorInfo variable to view description of the error.


API Tags:
Access:  public


[ Top ]
SendmailSend  [line 598]

  bool SendmailSend( string $header, string $body  )

Sends mail using the $Sendmail program.

Parameters:
string   $header:  The message headers
string   $body:  The message body

API Tags:
Access:  protected


[ Top ]
set  [line 2144]

  void set( string $name, [mixed $value = '']  )

Set (or reset) Class Objects (variables)

Usage Example: $page->set('X-Priority', '3');

Parameters:
string   $name:  Parameter Name
mixed   $value:  Parameter Value NOTE: will not work with arrays, there are no arrays to set/reset

API Tags:
Access:  public


[ Top ]
SetError  [line 1906]

  void SetError( $msg  )

Adds the error message to the error container.

Parameters:
   $msg: 

API Tags:
Access:  protected


[ Top ]
SetFrom  [line 488]

  boolean SetFrom( string $address, [string $name = ''], [ $auto = 1]  )

Set the From and FromName properties

Parameters:
string   $address: 
string   $name: 
   $auto: 

API Tags:
Access:  public


[ Top ]
SetLanguage  [line 850]

  void SetLanguage( [string $langcode = 'en'], [string $lang_path = 'language/']  )

Sets the language for all class error messages.

Returns false if it cannot load the language file. The default language is English.

Parameters:
string   $langcode:  ISO 639-1 2-character language code (e.g. Portuguese: "br")
string   $lang_path:  Path to the language file directory

API Tags:
Access:  public


[ Top ]
SetWordWrap  [line 1052]

  void SetWordWrap( )

Set the body wrapping.


API Tags:
Access:  public


[ Top ]
Sign  [line 2179]

  void Sign( $cert_filename, string $key_filename, string $key_pass  )

Set the private key file and password to sign the message.

Parameters:
string   $key_filename:  Parameter File Name
string   $key_pass:  Password for private key
   $cert_filename: 

API Tags:
Access:  public


[ Top ]
SmtpClose  [line 834]

  void SmtpClose( )

Closes the active SMTP session if one exists.


API Tags:
Access:  public


[ Top ]
SmtpConnect  [line 772]

  bool SmtpConnect( )

Initiates a connection to an SMTP server.

Returns false if the operation failed.


API Tags:
Access:  public
Uses:  SMTP


[ Top ]
SmtpSend  [line 701]

  bool SmtpSend( string $header, string $body  )

Sends mail via SMTP using PhpSMTP Returns false if there is a bad MAIL FROM, RCPT, or DATA input.

Parameters:
string   $header:  The message headers
string   $body:  The message body

API Tags:
Access:  protected
Uses:  SMTP


[ Top ]
TextLine  [line 1326]

  string TextLine( $value  )

Returns a formatted mail line.

Parameters:
   $value: 

API Tags:
Access:  public


[ Top ]
UTF8CharBoundary  [line 1014]

  int UTF8CharBoundary( string $encodedText, int $maxLength  )

Finds last character boundary prior to maxLength in a utf-8 quoted (printable) encoded string.

Original written by Colin Brown.

Parameters:
string   $encodedText:  utf-8 QP text
int   $maxLength:  find last character boundary prior to this length

API Tags:
Access:  public


[ Top ]
WrapText  [line 932]

  string WrapText( string $message, integer $length, [boolean $qp_mode = false]  )

Wraps message for use with mailers that do not automatically perform wrapping and for quoted-printable.

Original written by philippe.

Parameters:
string   $message:  The message to wrap
integer   $length:  The line length to wrap to
boolean   $qp_mode:  Whether to run in Quoted-Printable mode

API Tags:
Access:  public


[ Top ]
Constants
STOP_CONTINUE = 1 [line 331]

[ Top ]
STOP_CRITICAL = 2 [line 332]

[ Top ]
STOP_MESSAGE = 0 [line 330]

[ Top ]

Documentation generated on Sat, 05 Jan 2013 15:51:05 +0100 by phpDocumentor 1.4.3