Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: PHPMailer

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5

 Class PHPMailer

Description

PHPMailer - PHP email transport class

Located in /phpmailer/phpmailer.php (line 20)

Class PHPMailer
Direct descendents
Class Description
ClassJMail E-Mail Class. Provides a common interface to send e-mail from the Joomla! Framework
Variable Summary
Variable string $AltBody
Variable string $Body
Variable string $CharSet
Variable string $ContentType
Variable string $Encoding
Variable string $ErrorInfo
Variable string $From
Variable string $FromName
Variable string $Helo
Variable string $Host
Variable string $Hostname
Variable string $Mailer
Variable string $Password
Variable string $PluginDir
Variable int $Port
Variable int $Priority
Variable string $Sender
Variable string $Sendmail
Variable bool $SMTPAuth
Variable bool $SMTPDebug
Variable string $Subject
Variable int $Timeout
Variable string $Username
Variable string $Version
Variable int $WordWrap
Method Summary
Method void AddAddress (string $address, [string $name = ""])
Method bool AddAttachment (string $path, [string $name = ""], [string $encoding = "base64"], [string $type = "application/octet-stream"])
Method void AddBCC (string $address, [string $name = ""])
Method void AddCC (string $address, [string $name = ""])
Method void AddCustomHeader ( $custom_header)
Method bool AddEmbeddedImage (string $path, string $cid, [string $name = ""], [string $encoding = "base64"], [string $type = "application/octet-stream"])
Method void AddReplyTo (string $address, [string $name = ""])
Method void AddStringAttachment (string $string, string $filename, [string $encoding = "base64"], [string $type = "application/octet-stream"])
Method void ClearAddresses ()
Method void ClearBCCs ()
Method void ClearCCs ()
Method void ClearReplyTos ()
Method bool IsError ()
Method void IsHTML (bool $bool)
Method void IsMail ()
Method void IsQmail ()
Method void IsSendmail ()
Method void IsSMTP ()
Method bool Send ()
Method bool SetLanguage (string $lang_type, [string $lang_path = "language/"])
Method void SmtpClose ()
Variables
string $AltBody = "" (line 96)

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 = "" (line 87)

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

If HTML then run IsHTML(true).

string $CharSet = "iso-8859-1" (line 36)

Sets the CharSet of the message.

string $ConfirmReadingTo = "" (line 134)

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

string $ContentType = "text/plain" (line 42)

Sets the Content-type of the message.

string $Encoding = "8bit" (line 49)

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

string $ErrorInfo = "" (line 55)

Holds the most recent mailer error message.

string $From = "root@localhost" (line 61)

Sets the From email address for the message.

string $FromName = "Root User" (line 67)

Sets the From name of the message.

string $Helo = "" (line 168)

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

string $Host = "localhost" (line 156)

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.

string $Hostname = "" (line 142)

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'.

string $Mailer = "mail" (line 109)

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

string $Password = "" (line 186)

Sets SMTP password.

string $PluginDir = "" (line 122)

Path to PHPMailer plugins. This is now only useful if the SMTP class is in a different directory than the PHP include path.

int $Port = 25 (line 162)

Sets the default SMTP server port.

int $Priority = 3 (line 30)

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

string $Sender = "" (line 74)

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 = "/usr/sbin/sendmail" (line 115)

Sets the path of the sendmail program.

bool $SMTPAuth = false (line 174)

Sets SMTP authentication. Utilizes the Username and Password variables.

bool $SMTPDebug = false (line 199)

Sets SMTP class debugging on or off.

bool $SMTPKeepAlive = false (line 207)

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 $Subject = "" (line 80)

Sets the Subject of the message.

int $Timeout = 10 (line 193)

Sets the SMTP server timeout in seconds. This function will not work with the win32 version.

string $Username = "" (line 180)

Sets SMTP username.

string $Version = "1.73" (line 128)

Holds PHPMailer version.

int $WordWrap = 0 (line 103)

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

Methods
AddAddress (line 286)

Adds a "To" address.

void AddAddress (string $address, [string $name = ""])
  • string $address
  • string $name
AddAttachment (line 996)

Adds an attachment from a path on the filesystem.

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

bool AddAttachment (string $path, [string $name = ""], [string $encoding = "base64"], [string $type = "application/octet-stream"])
  • string $path: Path to the attachment.
  • string $name: Overrides the attachment name.
  • string $encoding: File encoding (see $Encoding).
  • string $type: File extension (MIME) type.
AddBCC (line 314)

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

void AddBCC (string $address, [string $name = ""])
  • string $address
  • string $name
AddCC (line 300)

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

void AddCC (string $address, [string $name = ""])
  • string $address
  • string $name
AddCustomHeader (line 1494)

Adds a custom header.

void AddCustomHeader ( $custom_header)
  • $custom_header
AddEmbeddedImage (line 1274)

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".

bool AddEmbeddedImage (string $path, string $cid, [string $name = ""], [string $encoding = "base64"], [string $type = "application/octet-stream"])
  • 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.
AddReplyTo (line 326)

Adds a "Reply-to" address.

void AddReplyTo (string $address, [string $name = ""])
  • string $address
  • string $name
AddStringAttachment (line 1247)

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.

void AddStringAttachment (string $string, string $filename, [string $encoding = "base64"], [string $type = "application/octet-stream"])
  • string $string: String attachment data.
  • string $filename: Name of the attachment.
  • string $encoding: File encoding (see $Encoding).
  • string $type: File extension (MIME) type.
ClearAddresses (line 1328)

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

void ClearAddresses ()
ClearAllRecipients (line 1361)

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

void ClearAllRecipients ()
ClearAttachments (line 1372)

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

void ClearAttachments ()
ClearBCCs (line 1344)

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

void ClearBCCs ()
ClearCCs (line 1336)

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

void ClearCCs ()
ClearCustomHeaders (line 1380)

Clears all custom headers. Returns void.

void ClearCustomHeaders ()
ClearReplyTos (line 1352)

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

void ClearReplyTos ()
IsError (line 1474)

Returns true if an error occurred.

bool IsError ()
IsHTML (line 235)

Sets message type to HTML.

void IsHTML (bool $bool)
  • bool $bool
IsMail (line 254)

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

void IsMail ()
IsQmail (line 270)

Sets Mailer to send message using the qmail MTA.

void IsQmail ()
IsSendmail (line 262)

Sets Mailer to send message using the $Sendmail program.

void IsSendmail ()
IsSMTP (line 246)

Sets Mailer to send message using SMTP.

void IsSMTP ()
Send (line 343)

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 Send ()

Redefined in descendants as:
SetLanguage (line 596)

Sets the language for all class error messages. Returns false if it cannot load the language file. The default language type is English.

  • access: public
bool SetLanguage (string $lang_type, [string $lang_path = "language/"])
  • string $lang_type: Type of language (e.g. Portuguese: "br")
  • string $lang_path: Path to the language file directory
SmtpClose (line 576)

Closes the active SMTP session if one exists.

void SmtpClose ()

Documentation generated on Mon, 05 Mar 2007 21:17:53 +0000 by phpDocumentor 1.3.1