linea21-externals
[ class tree: linea21-externals ] [ index: linea21-externals ] [ all elements ]

Class: PHPMailer

Source Location: /class/system/class.phpmailer.php

Class Overview


PHPMailer - PHP email transport class


Author(s):

  • Brent R. Matzelle

Copyright:

  • 2001 - 2003 Brent R. Matzelle

Variables

Methods



Class Details

[line 22]
PHPMailer - PHP email transport class



Tags:

author:  Brent R. Matzelle
copyright:  2001 - 2003 Brent R. Matzelle


[ Top ]


Class Variables

$AltBody =  ""

[line 98]

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.


Type:   string


[ Top ]

$Body =  ""

[line 89]

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

If HTML then run IsHTML(true).



Type:   string


[ Top ]

$CharSet =  "iso-8859-1"

[line 38]

Sets the CharSet of the message.


Type:   string


[ Top ]

$ConfirmReadingTo =  ""

[line 136]

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


Type:   string


[ Top ]

$ContentType =  "text/plain"

[line 44]

Sets the Content-type of the message.


Type:   string


[ Top ]

$Encoding =  "8bit"

[line 51]

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


Type:   string


[ Top ]

$ErrorInfo =  ""

[line 57]

Holds the most recent mailer error message.


Type:   string


[ Top ]

$From =  "root@localhost"

[line 63]

Sets the From email address for the message.


Type:   string


[ Top ]

$FromName =  "Root User"

[line 69]

Sets the From name of the message.


Type:   string


[ Top ]

$Helo =  ""

[line 171]

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


Type:   string


[ Top ]

$Host =  "localhost"

[line 159]

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.



Type:   string


[ Top ]

$Hostname =  ""

[line 144]

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


Type:   string


[ Top ]

$Mailer =  "mail"

[line 111]

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


Type:   string


[ Top ]

$Password =  ""

[line 189]

Sets SMTP password.


Type:   string


[ Top ]

$PluginDir =  "../class/system/"

[line 124]

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


Type:   string


[ Top ]

$Port =  25

[line 165]

Sets the default SMTP server port.


Type:   int


[ Top ]

$Priority =  3

[line 32]

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


Type:   int


[ Top ]

$Sender =  ""

[line 76]

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.


Type:   string


[ Top ]

$Sendmail =  "/usr/sbin/sendmail"

[line 117]

Sets the path of the sendmail program.


Type:   string


[ Top ]

$SMTPAuth =  false

[line 177]

Sets SMTP authentication. Utilizes the Username and Password variables.


Type:   bool


[ Top ]

$SMTPDebug =  false

[line 202]

Sets SMTP class debugging on or off.


Type:   bool


[ Top ]

$SMTPKeepAlive =  false

[line 210]

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


Type:   bool


[ Top ]

$Subject =  ""

[line 82]

Sets the Subject of the message.


Type:   string


[ Top ]

$Timeout =  10

[line 196]

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


Type:   int


[ Top ]

$Username =  ""

[line 183]

Sets SMTP username.


Type:   string


[ Top ]

$Version =  "1.71"

[line 130]

Holds PHPMailer version.


Type:   string


[ Top ]

$WordWrap =  0

[line 105]

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


Type:   int


[ Top ]



Class Methods


method AddAddress [line 289]

void AddAddress( string $address, [string $name = ""])

Adds a "To" address.



Parameters:

string   $address  
string   $name  

[ Top ]

method AddAttachment [line 1002]

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.

[ Top ]

method AddBCC [line 317]

void 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  

[ Top ]

method AddCC [line 303]

void 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  

[ Top ]

method AddCustomHeader [line 1527]

void AddCustomHeader( $custom_header)

Adds a custom header.



Parameters:

   $custom_header  

[ Top ]

method AddEmbeddedImage [line 1277]

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.

[ Top ]

method AddReplyTo [line 329]

void AddReplyTo( string $address, [string $name = ""])

Adds a "Reply-to" address.



Parameters:

string   $address  
string   $name  

[ Top ]

method AddStringAttachment [line 1250]

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.

[ Top ]

method ClearAddresses [line 1331]

void ClearAddresses( )

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



[ Top ]

method ClearAllRecipients [line 1364]

void ClearAllRecipients( )

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



[ Top ]

method ClearAttachments [line 1375]

void ClearAttachments( )

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



[ Top ]

method ClearBCCs [line 1347]

void ClearBCCs( )

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



[ Top ]

method ClearCCs [line 1339]

void ClearCCs( )

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



[ Top ]

method ClearCustomHeaders [line 1383]

void ClearCustomHeaders( )

Clears all custom headers. Returns void.



[ Top ]

method ClearReplyTos [line 1355]

void ClearReplyTos( )

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



[ Top ]

method IsError [line 1507]

bool IsError( )

Returns true if an error occurred.



[ Top ]

method IsHTML [line 238]

void IsHTML( bool $bool)

Sets message type to HTML.



Parameters:

bool   $bool  

[ Top ]

method IsMail [line 257]

void IsMail( )

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



[ Top ]

method IsQmail [line 273]

void IsQmail( )

Sets Mailer to send message using the qmail MTA.



[ Top ]

method IsSendmail [line 265]

void IsSendmail( )

Sets Mailer to send message using the $Sendmail program.



[ Top ]

method IsSMTP [line 249]

void IsSMTP( )

Sets Mailer to send message using SMTP.



[ Top ]

method Send [line 346]

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.



[ Top ]

method SetLanguage [line 601]

bool SetLanguage( string $lang_type, [string $lang_path = ""])

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



Tags:

access:  public


Parameters:

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

[ Top ]

method SmtpClose [line 581]

void SmtpClose( )

Closes the active SMTP session if one exists.



[ Top ]


Documentation generated on Fri, 16 Oct 2009 09:29:55 +0200 by phpDocumentor 1.4.1