Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

PHPMailer Class Reference

List of all members.

Public Member Functions

 IsHTML ($bool)
 Sets message type to HTML.
 IsSMTP ()
 Sets Mailer to send message using SMTP.
 IsMail ()
 Sets Mailer to send message using PHP mail() function.
 IsSendmail ()
 Sets Mailer to send message using the $Sendmail program.
 IsQmail ()
 Sets Mailer to send message using the qmail MTA.
 AddAddress ($address, $name="")
 Adds a "To" address.
 AddCC ($address, $name="")
 Adds a "Cc" address.
 AddBCC ($address, $name="")
 Adds a "Bcc" address.
 AddReplyTo ($address, $name="")
 Adds a "Reply-to" address.
 Send ()
 Creates message and assigns Mailer.
 SendmailSend ($header, $body)
 Sends mail using the $Sendmail program.
 MailSend ($header, $body)
 Sends mail using the PHP mail() function.
 SmtpSend ($header, $body)
 Sends mail via SMTP using PhpSMTP (Author: Chris Ryan).
 SmtpConnect ()
 Initiates a connection to an SMTP server.
 SmtpClose ()
 Closes the active SMTP session if one exists.
 SetLanguage ($lang_type, $lang_path="language/")
 Sets the language for all class error messages.
 AddrAppend ($type, $addr)
 Creates recipient headers.
 AddrFormat ($addr)
 Formats an address correctly.
 WrapText ($message, $length, $qp_mode=false)
 Wraps message for use with mailers that do not automatically perform wrapping and for quoted-printable.
 SetWordWrap ()
 Set the body wrapping.
 CreateHeader ()
 Assembles message header.

Public Attributes

 $Priority = 3
 $CharSet = "iso-8859-1"
 $ContentType = "text/plain"
 $Encoding = "8bit"
 $ErrorInfo = ""
 $From = "root@localhost"
 $FromName = "Root User"
 $Sender = ""
 $Subject = ""
 $Body = ""
 $AltBody = ""
 $WordWrap = 0
 $Mailer = "mail"
 $Sendmail = "/usr/sbin/sendmail"
 $PluginDir = ""
 $Version = "1.73"
 $ConfirmReadingTo = ""
 $Hostname = ""
 $Host = "localhost"
 $Port = 25
 $Helo = ""
 $SMTPAuth = false
 $Username = ""
 $Password = ""
 $Timeout = 10
 $SMTPDebug = false
 $SMTPKeepAlive = false
 $smtp = NULL
 #@+ private
 $to = array()
 $cc = array()
 $bcc = array()
 $ReplyTo = array()
 $attachment = array()
 $CustomHeader = array()
 $message_type = ""
 $boundary = array()
 $language = array()
 $error_count = 0
 $LE = "\n"

Member Function Documentation

PHPMailer::AddAddress address,
name = ""
 

Adds a "To" address.

Parameters:
string $address
string $name
Returns:
void

Definition at line 286 of file class.phpmailer.php.

PHPMailer::AddBCC address,
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
Returns:
void

Definition at line 314 of file class.phpmailer.php.

PHPMailer::AddCC address,
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
Returns:
void

Definition at line 300 of file class.phpmailer.php.

PHPMailer::AddrAppend type,
addr
 

Creates recipient headers.

private

Returns:
string

Definition at line 620 of file class.phpmailer.php.

PHPMailer::AddReplyTo address,
name = ""
 

Adds a "Reply-to" address.

Parameters:
string $address
string $name
Returns:
void

Definition at line 326 of file class.phpmailer.php.

PHPMailer::AddrFormat addr  ) 
 

Formats an address correctly.

private

Returns:
string

Definition at line 638 of file class.phpmailer.php.

PHPMailer::CreateHeader  ) 
 

Assembles message header.

private

Returns:
string

Returns the start of a message boundary. private

Returns the end of a message boundary. private

Sets the message type. private

Returns:
void

Returns a formatted header line. private

Returns:
string

Returns a formatted mail line. private

Returns:
string

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.
Returns:
bool

Attaches all fs, string, and binary attachments to the message. Returns an empty string on failure. private

Returns:
string

Encodes attachment in requested format. Returns an empty string on failure. private

Returns:
string

Encodes string to requested format. Returns an empty string on failure. private

Returns:
string

Encode a header string to best of Q, B, quoted or none. private

Returns:
string

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.
Returns:
void

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.
Returns:
bool

Returns true if an inline attachment is present. private

Returns:
bool

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

Returns:
void

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

Returns:
void

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

Returns:
void

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

Returns:
void

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

Returns:
void

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

Returns:
void

Clears all custom headers. Returns void.

Returns:
void

Adds the error message to the error container. Returns void. private

Returns:
void

Returns the proper RFC 822 formatted date. private

Returns:
string

Returns the appropriate server variable. Should work with both PHP 4.1.0+ as well as older versions. Returns an empty string if nothing is found. private

Returns:
mixed

Returns the server hostname or 'localhost.localdomain' if unknown. private

Returns:
string

Returns a message in the appropriate language. private

Returns:
string

Returns true if an error occurred.

Returns:
bool

Changes every end of line from CR or LF to CRLF. private

Returns:
string

Adds a custom header.

Returns:
void

Definition at line 757 of file class.phpmailer.php.

PHPMailer::IsHTML bool  ) 
 

Sets message type to HTML.

Parameters:
bool $bool
Returns:
void

Definition at line 235 of file class.phpmailer.php.

PHPMailer::IsMail  ) 
 

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

Returns:
void

Definition at line 254 of file class.phpmailer.php.

PHPMailer::IsQmail  ) 
 

Sets Mailer to send message using the qmail MTA.

Returns:
void

Definition at line 270 of file class.phpmailer.php.

PHPMailer::IsSendmail  ) 
 

Sets Mailer to send message using the $Sendmail program.

Returns:
void

Definition at line 262 of file class.phpmailer.php.

PHPMailer::IsSMTP  ) 
 

Sets Mailer to send message using SMTP.

Returns:
void

Definition at line 246 of file class.phpmailer.php.

PHPMailer::MailSend header,
body
 

Sends mail using the PHP mail() function.

private

Returns:
bool

Definition at line 421 of file class.phpmailer.php.

PHPMailer::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:
bool

Definition at line 343 of file class.phpmailer.php.

PHPMailer::SendmailSend header,
body
 

Sends mail using the $Sendmail program.

private

Returns:
bool

Definition at line 391 of file class.phpmailer.php.

PHPMailer::SetLanguage lang_type,
lang_path = "language/"
 

Sets the language for all class error messages.

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

Parameters:
string $lang_type Type of language (e.g. Portuguese: "br")
string $lang_path Path to the language file directory public
Returns:
bool

Definition at line 596 of file class.phpmailer.php.

PHPMailer::SetWordWrap  ) 
 

Set the body wrapping.

private

Returns:
void

Definition at line 735 of file class.phpmailer.php.

PHPMailer::SmtpClose  ) 
 

Closes the active SMTP session if one exists.

Returns:
void

Definition at line 576 of file class.phpmailer.php.

PHPMailer::SmtpConnect  ) 
 

Initiates a connection to an SMTP server.

Returns false if the operation failed. private

Returns:
bool

Definition at line 526 of file class.phpmailer.php.

PHPMailer::SmtpSend header,
body
 

Sends mail via SMTP using PhpSMTP (Author: Chris Ryan).

Returns bool. Returns false if there is a bad MAIL FROM, RCPT, or DATA input. private

Returns:
bool

Definition at line 459 of file class.phpmailer.php.

PHPMailer::WrapText message,
length,
qp_mode = false
 

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

Original written by philippe. private

Returns:
string

Definition at line 657 of file class.phpmailer.php.


Member Data Documentation

PHPMailer::$AltBody = ""
 

Definition at line 96 of file class.phpmailer.php.

PHPMailer::$attachment = array()
 

Definition at line 217 of file class.phpmailer.php.

PHPMailer::$bcc = array()
 

Definition at line 215 of file class.phpmailer.php.

PHPMailer::$Body = ""
 

Definition at line 87 of file class.phpmailer.php.

PHPMailer::$boundary = array()
 

Definition at line 220 of file class.phpmailer.php.

PHPMailer::$cc = array()
 

Definition at line 214 of file class.phpmailer.php.

PHPMailer::$CharSet = "iso-8859-1"
 

Definition at line 36 of file class.phpmailer.php.

PHPMailer::$ConfirmReadingTo = ""
 

Definition at line 134 of file class.phpmailer.php.

PHPMailer::$ContentType = "text/plain"
 

Definition at line 42 of file class.phpmailer.php.

PHPMailer::$CustomHeader = array()
 

Definition at line 218 of file class.phpmailer.php.

PHPMailer::$Encoding = "8bit"
 

Definition at line 49 of file class.phpmailer.php.

PHPMailer::$error_count = 0
 

Definition at line 222 of file class.phpmailer.php.

PHPMailer::$ErrorInfo = ""
 

Definition at line 55 of file class.phpmailer.php.

PHPMailer::$From = "root@localhost"
 

Definition at line 61 of file class.phpmailer.php.

PHPMailer::$FromName = "Root User"
 

Definition at line 67 of file class.phpmailer.php.

PHPMailer::$Helo = ""
 

Definition at line 168 of file class.phpmailer.php.

PHPMailer::$Host = "localhost"
 

Definition at line 156 of file class.phpmailer.php.

PHPMailer::$Hostname = ""
 

Definition at line 142 of file class.phpmailer.php.

PHPMailer::$language = array()
 

Definition at line 221 of file class.phpmailer.php.

PHPMailer::$LE = "\n"
 

Definition at line 223 of file class.phpmailer.php.

PHPMailer::$Mailer = "mail"
 

Definition at line 109 of file class.phpmailer.php.

PHPMailer::$message_type = ""
 

Definition at line 219 of file class.phpmailer.php.

PHPMailer::$Password = ""
 

Definition at line 186 of file class.phpmailer.php.

PHPMailer::$PluginDir = ""
 

Definition at line 122 of file class.phpmailer.php.

PHPMailer::$Port = 25
 

Definition at line 162 of file class.phpmailer.php.

PHPMailer::$Priority = 3
 

Definition at line 30 of file class.phpmailer.php.

PHPMailer::$ReplyTo = array()
 

Definition at line 216 of file class.phpmailer.php.

PHPMailer::$Sender = ""
 

Definition at line 74 of file class.phpmailer.php.

PHPMailer::$Sendmail = "/usr/sbin/sendmail"
 

Definition at line 115 of file class.phpmailer.php.

PHPMailer::$smtp = NULL
 

#@+ private

Definition at line 212 of file class.phpmailer.php.

PHPMailer::$SMTPAuth = false
 

Definition at line 174 of file class.phpmailer.php.

PHPMailer::$SMTPDebug = false
 

Definition at line 199 of file class.phpmailer.php.

PHPMailer::$SMTPKeepAlive = false
 

Definition at line 207 of file class.phpmailer.php.

PHPMailer::$Subject = ""
 

Definition at line 80 of file class.phpmailer.php.

PHPMailer::$Timeout = 10
 

Definition at line 193 of file class.phpmailer.php.

PHPMailer::$to = array()
 

Definition at line 213 of file class.phpmailer.php.

PHPMailer::$Username = ""
 

Definition at line 180 of file class.phpmailer.php.

PHPMailer::$Version = "1.73"
 

Definition at line 128 of file class.phpmailer.php.

PHPMailer::$WordWrap = 0
 

Definition at line 103 of file class.phpmailer.php.


The documentation for this class was generated from the following file:
Generated on Fri Oct 27 12:26:42 2006 for BaseJumper by doxygen 1.3.9.1