» PHPMailer for PHP4
» PHPMailer for PHP5/6
» PHPMailer-FE (Form2Email)
» PHPMailer-ML
» PHPMailer-BMH

Updated for PHPMailer v5.0.0

Methods (v5.0.0) Type Default Description
set($name, $value) string $name
string $value
  Method provides ability for user to create own custom pseudo-properties (like X-Headers, for example). Example use:
$mail->set('X-MSMail-Priority', 'Normal');
addCustomHeader($value) string $value   Method provides ability for user to create own custom headers (like X-Priority, for example). Example use:
$mail->addCustomHeader("X-Priority: 3");
MsgHTML($message)     Evaluates the message and returns modifications for inline images and backgrounds. Sets the IsHTML() method to true, initializes AltBody() to either a text version of the message or default text.
IsMail() boolean true Sets Mailer to send message using PHP mail() function. (true, false or blank)
IsSMTP() boolean   Sets Mailer to send message using SMTP. If set to true, other options are also available. (true, false or blank)
IsSendmail() boolean   Sets Mailer to send message using the Sendmail program. (true, false or blank)
IsQmail() boolean   Sets Mailer to send message using the qmail MTA. (true, false or blank)
SetFrom($address, $name = "") string $address
string $name
  Adds a "From" address.
AddAddress($address, $name = "") string $address
string $name
  Adds a "To" address.
AddCC($address, $name = "") string $address
string $name
  Adds a "Cc" address. Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
AddBCC($address, $name = "") string $address
string $name
  Adds a "Bcc" address. Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
AddReplyTo($address, $name = "") string $address
string $name
  Adds a "Reply-to" address.
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. Returns true on success, false on failure.
AddAttachment($path, $name = "", $encoding = "base64",
    $type = "application/octet-stream")
string $path
string $name
string $encoding
string $type
  Adds an attachment from a path on the filesystem. Returns false if the file could not be found or accessed.
AddEmbeddedImage($path, $cid, $name = "", $encoding = "base64",
    $type = "application/octet-stream")
string $path
string $cid
string $name
string $encoding
string $type
  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". If you use the MsgHTML() method, there is no need to use AddEmbeddedImage() method.
ClearAddresses()     Clears all recipients assigned in the TO array. Returns void.
ClearCCs()     Clears all recipients assigned in the CC array. Returns void.
ClearBCCs()     Clears all recipients assigned in the BCC array. Returns void.
ClearReplyTos()     Clears all recipients assigned in the ReplyTo array. Returns void.
ClearAllRecipients()     Clears all recipients assigned in the TO, CC and BCC array. Returns void.
ClearAttachments()     Clears all previously set filesystem, string, and binary attachments. Returns void.
ClearCustomHeaders()     Clears all custom headers. Returns void.
Design by WorxStudio.com Copyright © 1999-2009, Worx International Inc. All Rights Reserved. Privacy Policy