Свойство | Тип | Описание | |
---|---|---|---|
$AltBody | string | 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. | |
$Body | string | If HTML then run IsHTML(true). | |
$CharSet | string | Sets the CharSet of the message. | |
$ConfirmReadingTo | string | Sets the email address that a reading confirmation will be sent. | |
$ContentType | string | Sets the Content-type of the message. | |
$Encoding | string | Sets the Encoding of the message. Options for this are "8bit", "7bit", "binary", "base64", and "quoted-printable". | |
$ErrorInfo | string | Holds the most recent mailer error message. | |
$From | string | Sets the From email address for the message. | |
$FromName | string | Sets the From name of the message. | |
$Helo | string | Sets the SMTP HELO of the message (Default is $Hostname). | |
$Host | string | Hosts will be tried in order. | |
$Hostname | string | 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'. | |
$Mailer | string | Method to send mail: ("mail", "sendmail", or "smtp"). | |
$MessageID | string | If empty, a unique id will be generated. | |
$Password | string | Sets SMTP password. | |
$PluginDir | string | Path to PHPMailer plugins. This is now only useful if the SMTP class is in a different directory than the PHP include path. | |
$Port | integer | Sets the default SMTP server port. | |
$Priority | integer | Email priority (1 = High, 3 = Normal, 5 = low). | |
$SMTPAuth | boolean | Sets SMTP authentication. Utilizes the Username and Password variables. | |
$SMTPDebug | boolean | Sets SMTP class debugging on or off. | |
$SMTPKeepAlive | boolean | 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(). | |
$SMTPSecure | string | Options are "", "ssl" or "tls" | |
$Sender | string | 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. | |
$Sendmail | string | Sets the path of the sendmail program. | |
$SingleTo | boolean | Provides the ability to have the TO field process individual emails, instead of sending to entire TO addresses | |
$Subject | string | Sets the Subject of the message. | |
$Timeout | integer | Sets the SMTP server timeout in seconds. This function will not work with the win32 version. | |
$Username | string | Sets SMTP username. | |
$Version | string | Holds PHPMailer version. | |
$WordWrap | integer | Sets word wrapping on the body of the message to a given number of characters. |
Метод | Описание | |
---|---|---|
AddAddress ( string $address, string $name = '' ) : void | Adds a "To" address. | |
AddAttachment ( string $path, string $name = '', string $encoding = 'base64', string $type = 'application/octet-stream' ) : boolean | Adds an attachment from a path on the filesystem. | |
AddBCC ( string $address, string $name = '' ) : void | Adds a "Bcc" address. Note: this function works with the SMTP mailer on win32, not with the "mail" mailer. | |
AddCC ( string $address, string $name = '' ) : void | Adds a "Cc" address. Note: this function works with the SMTP mailer on win32, not with the "mail" mailer. | |
AddCustomHeader ( $custom_header ) : void | Adds a custom header. | |
AddEmbeddedImage ( string $path, string $cid, string $name = '', string $encoding = 'base64', string $type = 'application/octet-stream' ) : boolean | 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". | |
AddReplyTo ( string $address, string $name = '' ) : void | Adds a "Reply-to" address. | |
AddStringAttachment ( string $string, string $filename, string $encoding = 'base64', string $type = 'application/octet-stream' ) : void | Adds a string or binary attachment (non-filesystem) to the list. | |
AddrAppend ( $type, $addr ) : string | Creates recipient headers. | |
AddrFormat ( $addr ) : string | Formats an address correctly. | |
AttachAll ( ) : string | Attaches all fs, string, and binary attachments to the message. | |
Base64EncodeWrapMB ( string $str ) : string | Correctly encodes and wraps long multibyte strings for mail headers without breaking lines within a character. | |
ClearAddresses ( ) : void | Clears all recipients assigned in the TO array. Returns void. | |
ClearAllRecipients ( ) : void | Clears all recipients assigned in the TO, CC and BCC array. Returns void. | |
ClearAttachments ( ) : void | Clears all previously set filesystem, string, and binary attachments. Returns void. | |
ClearBCCs ( ) : void | Clears all recipients assigned in the BCC array. Returns void. | |
ClearCCs ( ) : void | Clears all recipients assigned in the CC array. Returns void. | |
ClearCustomHeaders ( ) : void | Clears all custom headers. Returns void. | |
ClearReplyTos ( ) : void | Clears all recipients assigned in the ReplyTo array. Returns void. | |
CreateBody ( ) : string | Assembles the message body. Returns an empty string on failure. | |
CreateHeader ( ) : string | Assembles message header. | |
EncodeFile ( $path, $encoding = 'base64' ) : string | Encodes attachment in requested format. Returns an empty string on failure. | |
EncodeHeader ( $str, $position = 'text' ) : string | Encode a header string to best of Q, B, quoted or none. | |
EncodeQ ( $str, $position = 'text' ) : string | Encode string to q encoding. | |
EncodeQP ( $input = '', integer $line_max = 76, $space_conv = false ) : string | Encode string to quoted-printable. | |
EncodeString ( $str, $encoding = 'base64' ) : string | Encodes string to requested format. Returns an empty string on failure. | |
EndBoundary ( $boundary ) | Returns the end of a message boundary. | |
GetBoundary ( $boundary, $charSet, $contentType, $encoding ) | Returns the start of a message boundary. | |
GetMailMIME ( ) : string | Returns the message MIME. | |
HasMultiBytes ( string $str ) : boolean | Checks if a string contains multibyte characters. | |
HeaderLine ( $name, $value ) | * Returns a formatted header line. | |
InlineImageExists ( ) : boolean | Returns true if an inline attachment is present. | |
IsError ( ) : boolean | Returns true if an error occurred. | |
IsHTML ( boolean $bool ) : void | Sets message type to HTML. | |
IsMail ( ) : void | Sets Mailer to send message using PHP mail() function. | |
IsQmail ( ) : void | Sets Mailer to send message using the qmail MTA. | |
IsSMTP ( ) : void | Sets Mailer to send message using SMTP. | |
IsSendmail ( ) : void | Sets Mailer to send message using the $Sendmail program. | |
MailSend ( $header, $body ) : boolean | Sends mail using the PHP mail() function. | |
MsgHTML ( $message, $basedir = '' ) | Evaluates the message and returns modifications for inline images and backgrounds | |
SecureHeader ( string $str ) : string | Strips newlines to prevent header injection. | |
Send ( ) : boolean | 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. | |
SendmailSend ( $header, $body ) : boolean | Sends mail using the $Sendmail program. | |
SetLanguage ( string $lang_type = 'en', string $lang_path = 'language/' ) : boolean | Sets the language for all class error messages. Returns false if it cannot load the language file. The default language type is English. | |
SetMessageType ( ) : void | Sets the message type. | |
SetWordWrap ( ) : void | Set the body wrapping. | |
Sign ( $cert_filename, string $key_filename, string $key_pass ) | Set the private key file and password to sign the message. | |
SmtpClose ( ) : void | Closes the active SMTP session if one exists. | |
SmtpConnect ( ) : boolean | Initiates a connection to an SMTP server. Returns false if the operation failed. | |
SmtpSend ( $header, $body ) : boolean | Sends mail via SMTP using PhpSMTP (Author: Chris Ryan). Returns bool. Returns false if there is a bad MAIL FROM, RCPT, or DATA input. | |
TextLine ( $value ) : string | Returns a formatted mail line. | |
UTF8CharBoundary ( string $encodedText, integer $maxLength ) : integer | Finds last character boundary prior to maxLength in a utf-8 quoted (printable) encoded string. | |
WrapText ( $message, $length, $qp_mode = false ) : string | Wraps message for use with mailers that do not automatically perform wrapping and for quoted-printable. | |
_mime_types ( $ext = '' ) : mime | Gets the mime type of the embedded or inline image | |
getFile ( string $filename ) | Read a file from a supplied filename and return it. | |
get_magic_quotes ( ) | ||
set ( string $name, mixed $value = '' ) | Set (or reset) Class Objects (variables) |
Метод | Описание | |
---|---|---|
FixEOL ( $str ) : string | Changes every end of line from CR or LF to CRLF. | |
Lang ( $key ) : string | Returns a message in the appropriate language. | |
RFCDate ( ) : string | Returns the proper RFC 822 formatted date. | |
ServerHostname ( ) : string | Returns the server hostname or 'localhost.localdomain' if unknown. | |
SetError ( $msg ) : void | Adds the error message to the error container. |
public AddAttachment ( string $path, string $name = '', string $encoding = 'base64', string $type = 'application/octet-stream' ) : boolean | ||
$path | string | Path to the attachment. |
$name | string | Overrides the attachment name. |
$encoding | string | File encoding (see $Encoding). |
$type | string | File extension (MIME) type. |
Результат | boolean |
public AddCustomHeader ( $custom_header ) : void | ||
Результат | void |
public AddEmbeddedImage ( string $path, string $cid, string $name = '', string $encoding = 'base64', string $type = 'application/octet-stream' ) : boolean | ||
$path | string | Path to the attachment. |
$cid | string | Content ID of the attachment. Use this to identify the Id for accessing the image in an HTML form. |
$name | string | Overrides the attachment name. |
$encoding | string | File encoding (see $Encoding). |
$type | string | File extension (MIME) type. |
Результат | boolean |
public AddStringAttachment ( string $string, string $filename, string $encoding = 'base64', string $type = 'application/octet-stream' ) : void | ||
$string | string | String attachment data. |
$filename | string | Name of the attachment. |
$encoding | string | File encoding (see $Encoding). |
$type | string | File extension (MIME) type. |
Результат | void |
public AddrAppend ( $type, $addr ) : string | ||
Результат | string |
public AddrFormat ( $addr ) : string | ||
Результат | string |
public Base64EncodeWrapMB ( string $str ) : string | ||
$str | string | multi-byte text to wrap encode |
Результат | string |
public ClearAddresses ( ) : void | ||
Результат | void |
public ClearAllRecipients ( ) : void | ||
Результат | void |
public ClearAttachments ( ) : void | ||
Результат | void |
public ClearCustomHeaders ( ) : void | ||
Результат | void |
public ClearReplyTos ( ) : void | ||
Результат | void |
public CreateBody ( ) : string | ||
Результат | string |
public CreateHeader ( ) : string | ||
Результат | string |
public EncodeFile ( $path, $encoding = 'base64' ) : string | ||
Результат | string |
public EncodeHeader ( $str, $position = 'text' ) : string | ||
Результат | string |
public EncodeString ( $str, $encoding = 'base64' ) : string | ||
Результат | string |
public EndBoundary ( $boundary ) |
public GetBoundary ( $boundary, $charSet, $contentType, $encoding ) |
public GetMailMIME ( ) : string | ||
Результат | string |
public HasMultiBytes ( string $str ) : boolean | ||
$str | string | multi-byte text to wrap encode |
Результат | boolean |
public InlineImageExists ( ) : boolean | ||
Результат | boolean |
public IsSendmail ( ) : void | ||
Результат | void |
public MsgHTML ( $message, $basedir = '' ) |
public SecureHeader ( string $str ) : string | ||
$str | string | String |
Результат | string |
public SendmailSend ( $header, $body ) : boolean | ||
Результат | boolean |
public SetMessageType ( ) : void | ||
Результат | void |
public SmtpConnect ( ) : boolean | ||
Результат | boolean |
public _mime_types ( $ext = '' ) : mime | ||
Результат | mime | type of ext |
public string $AltBody | ||
Результат | string |
public string $CharSet | ||
Результат | string |
public string $ConfirmReadingTo | ||
Результат | string |
public string $ContentType | ||
Результат | string |
public string $Encoding | ||
Результат | string |
public string $ErrorInfo | ||
Результат | string |
public string $From | ||
Результат | string |
public string $FromName | ||
Результат | string |
public string $Helo | ||
Результат | string |
public string $Hostname | ||
Результат | string |
public string $Mailer | ||
Результат | string |
public string $MessageID | ||
Результат | string |
public string $PluginDir | ||
Результат | string |
public int $Priority | ||
Результат | integer |
public bool $SMTPAuth | ||
Результат | boolean |
public bool $SMTPDebug | ||
Результат | boolean |
public bool $SMTPKeepAlive | ||
Результат | boolean |
public string $SMTPSecure | ||
Результат | string |
public string $Sender | ||
Результат | string |
public string $Sendmail | ||
Результат | string |
public bool $SingleTo | ||
Результат | boolean |
public string $Subject | ||
Результат | string |
public int $Timeout | ||
Результат | integer |
public int $WordWrap | ||
Результат | integer |