Home  >  Article  >  Backend Development  >  All objects and attributes of phpmailer Chinese --original translation--a must-read for phpmailer users_PHP tutorial

All objects and attributes of phpmailer Chinese --original translation--a must-read for phpmailer users_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:52:02918browse




All objects and attributes of phpmailer Chinese original translation A must-read for phpmailer users
Solution
Foreword:
phpmailer is an excellent sending program, but there is relatively little Chinese information, so I manually translated phpmailer's elementindex.html, E version: [url=http://www.bblog.com/apidoc/elementindex_PHPMailer.html] link Mark http://www.bblog.com/apidoc/elementindex_PHPMailer.html[/url]. Due to the limited level, the translation may not be very accurate. I hope you can give me more advice. Because there are a lot of things, I divided them into three posts


AC

From:
[url=http://www.xiaoxiaoyu.cn/AMP/215.html]Link tag http://www.xiaoxiaoyu.cn/AMP/215.html[/url]

Starting with A:
$AltBody Property
From: PHPMailer::$AltBody, file: class.phpmailer.php
Note: The setting of this attribute is an alternative display that does not support HTML in the email body
AddAddress method
From: PHPMailer::AddAddress(), file: class.phpmailer.php
Description: Add recipients. Parameter 1 is the recipient's email address, and parameter 2 is the recipient's title. For example, AddAddress("xiaoxiaoxiaoyu@xiaoxiaoyu.cn","xiaoxiaoyu"), but parameter 2 is optional, AddAddress([url=http://www.phpchina.com/bbs/mailto:xiaoxiaoxiaoyu@xiaoxiaoyu.cn] link mark xiaoxiaoxiaoyu @xiaoxiaoyu.cn[/url]) is also possible. Function prototype:
public function AddAddress($address, $name = '') {}
AddAttachment method
From: PHPMailer::AddAttachment(), file: class.phpmailer.php
Description: Add attachments. Parameters: path, name, encoding, type. Among them, the path is required and the others are optional
Function prototype:
AddAttachment($path, $name = '', $encoding = 'base64', $type = 'application/octetstream'){}
AddBCC method
From: PHPMailer::AddBCC(), file: class.phpmailer.php
Description: Add a BCC. For the difference between CC and BCC, please see [[url=http://www.xiaoxiaoyu.cn/net/214.html]The difference between BCC and CC in link mark SMTP sending[/url]]. Parameter 1 is the address, parameter 2 is the name. Note that this method only supports SMTP under win32 and does not support the mail function
Function prototype:
public function AddBCC($address, $name = ''){}
AddCC method
From: PHPMailer::AddCC(), file: class.phpmailer.php
Description: Add a CC. For the difference between CC and BCC, please see [[url=http://www.xiaoxiaoyu.cn/net/214.html]The difference between BCC and CC in link mark SMTP sending[/url]]. Parameter 1 is the address, parameter 2 is the name. Note that this method only supports SMTP under win32 and does not support the mail function. Function prototype:
public function AddCC($address, $name = '') {}
AddCustomHeader method
From: PHPMailer::AddCustomHeader(), file: class.phpmailer.php
Description: Add a custom Email header. The parameter is header information
Function prototype:
public function AddCustomHeader($custom_header){}
AddEmbeddedImage method
From: PHPMailer::AddEmbeddedImage(), file: class.phpmailer.php
Description: Add an embedded image. Parameters: path, return handle [, name, encoding, type]
Function prototype:
public function AddEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = 'application/octetstream') {}
Tip: AddEmbeddedImage(PICTURE_PATH. "index_01.jpg ", "img_01 ", "index_01.jpg ");
Quote All objects and attributes of phpmailer Chinese --original translation--a must-read for phpmailer users_PHP tutorial
in html AddReplyTo method
From: PHPMailer::AddReplyTo(), file: class.phpmailer.php
Description: Add a reply label, such as "Replyto". Parameter 1 address, parameter 2 name
Function prototype:
public function AddReplyTo($address, $name = '') {}
AddStringAttachment method
From: PHPMailer::AddStringAttachment(), file: class.phpmailer.php
Description; Adds a string or binary attachment (nonfilesystem) to the list.? Parameters: string, file name [, encoding, type]
Function prototype:
public function AddStringAttachment($string, $filename, $encoding = 'base64', $type = 'application/octetstream') {}
Authenticate method
From: SMTP::Authenticate(), file: class.smtp.php
Note: To start SMTP authentication, it must be called after Hello(). If the authentication is successful, return true, parameter 1 username, parameter 2 password
Function prototype:
public function Authenticate($username, $password) {}
Starting with B
$Body Property
From: PHPMailer::$Body File: class.phpmailer.php
Description: Email content, HTML or Text format
Starting with C
$CharSet Property
From: PHPMailer::$CharSet File: class.phpmailer.php
Description: Email encoding, the default is iso88591
$ConfirmReadingTo property
From: PHPMailer::$ConfirmReadingTo file class.phpmailer.php
Description: Return receipt?
$ContentType attribute
From: PHPMailer::$ContentType file: class.phpmailer.php
Description: The type of document, the default is "text/plain"
$CRLF attribute
From: PHPMailer::$ContentType File: class.phpmailer.php
Description: Delimiter at the end of SMTP reply (SMTP reply line ending?)
class.phpmailer.php object
From: class.phpmailer.php File: class.phpmailer.php
Description: phpmailer object
class.smtp.php object
From: class.smtp.php File: class.smtp.php
Description: Object of SMTP function
ClearAddresses method
From: PHPMailer::ClearAddresses() File: class.phpmailer.php
Description: Clear the recipients and prepare for the next sending. The return type is void
ClearAllRecipients method
From: PHPMailer::ClearAllRecipients() File: class.phpmailer.php
Description: Clear all recipients, including CC (cc) and BCC (bcc)
ClearAttachments method
From: PHPMailer::ClearAttachments() File: class.phpmailer.php
Instructions: Clear attachment
ClearBCCs method
From: PHPMailer::ClearBCCs() file class.phpmailer.php
Description: Clear BCC (Bcc)
ClearCustomHeaders method
From: PHPMailer::ClearCustomHeaders() File: class.phpmailer.php
Description: Clear custom header
ClearReplyTos method
From: PHPMailer::ClearReplyTos() File: class.phpmailer.php
Instructions: Clearly reply to the person
Close method
From: SMTP::Close() File: class.smtp.php
Description: Close an SMTP connection
Connect method
From: SMTP::Connect() File: class.smtp.php
Description: Establish an SMTP connection


D8888D’s reply content
DN
From:[url=http://www.xiaoxiaoyu.cn/AMP/216.html]Link tag http://www.xiaoxiaoyu.cn/AMP/216.html[/url]


Starting with D
$do_debug attribute
From: SMTP::$do_debug File: class.smtp.php
Description: SMTP debug output
Data method
From: SMTP::Data() File: class.smtp.php
Description: Send a data command and message information to the server (sends the msg_data to the server)
Starting with E
$Encoding attribute
From: PHPMailer::$Encoding File: class.phpmailer.php
Description: Set the encoding method of the email, optional: "8bit", "7bit", "binary", "base64", and "quotedprintable".
$ErrorInfo attribute
From: PHPMailer::$ErrorInfo file: class.phpmailer.php
Description: Return the last error message in the SMTP email
Expand method
From: SMTP::Expand() File: class.smtp.php
Description: Returns all users in the mailing list. Returns an array if successful, otherwise returns false(Expand takes the name and asks the server to list all the people who are members of the _list_. Expand will return back and array of the result or false if an error occurs.)
Starting with F:
$From attribute
From: PHPMailer::$From file class.phpmailer.php
Description: Sender’s email address
$FromName attribute
From: PHPMailer::$FromName File: class.phpmailer.php
Description: Sender’s title
Starting with H:
$Helo attribute
From: PHPMailer::$Helo File: class.phpmailer.php
Description: Set the SMTP HELO, the default is $Hostname(Sets the SMTP HELO of the message (Default is $Hostname).)
$Host attribute
From: PHPMailer::$Host File: class.phpmailer.php
Description: Set the SMTP server, the format is: host name [port number], such as smtp1.example.com:25 and smtp2.example.com are both legal
$Hostname attribute
From: PHPMailer::$Hostname File: class.phpmailer.php
Description: The hostname set in MessageId and Received headers is also used by $Helo. If empty, defaults to SERVER_NAME or 'localhost.localdomain"
Hello method
From: SMTP::Hello() File: class.smtp.php
Description: Send HELO command to SMTP server
Help method
From: SMTP::Help() File: class.smtp.php
Note: If there are keywords, get the help information of the keywords
Starting with I:
IsError method
From: PHPMailer::IsError() File: class.phpmailer.php
Description: Returns whether an error occurred
IsHTML method
From: PHPMailer::IsHTML() File: class.phpmailer.php
Description: Set whether the letter is in HTML format
IsMail method
From:PHPMailer::IsMail() file: class.phpmailer.php
Description: Set whether to use php’s mail function to send emails
IsQmail method
From:PHPMailer::IsQmail() file: class.phpmailer.php
Description: Set whether to use qmail MTA to send emails
IsSendmail method
From: PHPMailer::IsSendmail() File: class.phpmailer.php
Description: Whether to use $Sendmail program to send emails
IsSMTP method
From: PHPMailer::IsSMTP() File: class.phpmailer.php
Description: Whether to use SMTP to send emails
Starting with M:
$Mailer attribute
From: PHPMailer::$Mailer File: class.phpmailer.php
Description: Sending method, one of ("mail", "sendmail", or "smtp").
Mail method
From: SMTP::Mail() File: class.smtp.php
Description: Start processing from an email address in $from, return true or false. If true, start sending
Starting with N:
Noop methods
From: SMTP::Noop() File: class.smtp.php
Description: Send a NOOP command to the SMTP server
D8888D’s reply content
PW
From:[url=http://www.xiaoxiaoyu.cn/AMP/217.html]Link tag http://www.xiaoxiaoyu.cn/AMP/217.html[/url]

Starting with P:
$Password attribute
From: PHPMailer::$Password file: class.phpmailer.php
Description: Set SMTP password
$PluginDir attribute
From: PHPMailer::$PluginDir File: class.phpmailer.php
Note: Set the plug-in directory of phpmailer, which is only valid when the smtp class is not in the phpmailer directory
$Port property
From: PHPMailer::$Port file: class.phpmailer.php
Description: Set the SMTP port number
$Priority attribute
From: PHPMailer::$Priority File: class.phpmailer.php
Description: Set the mail delivery priority. 1 = Urgent, 3 = Normal, 5 = Not urgent
PHPMailer object
From: PHPMailer File: class.phpmailer.php
Description: PHPMailer PHP email transport class
Starting with Q
Quit method
From: SMTP::Quit() File: class.smtp.php
Description: Send Quit command to the server if no error occurs. Then close the sock, otherwise $close_on_error is true
Starting with R
Recipient method
From: SMTP::Recipient() File: class.smtp.php
Description: Use To to send RCPT command to SMTP, the parameter is: $to
Reset method
From: SMTP::Reset() File: class.smtp.php
Description: Send the RSET command to cancel the transfer in progress. Returns true if successful, otherwise false
Starting with S:
$Sender Property
From: PHPMailer::$Sender File: class.phpmailer.php
Description: Sets the Sender email (ReturnPath) of the message. If not empty, will be sent via f to sendmail or as 'MAIL FROM' in smtp mode.
$Sendmail Properties
From: PHPMailer::$Sendmail File: class.phpmailer.php
Description: Set the directory of the sending program
$SMTPAuth attribute
From: PHPMailer::$SMTPAuth File: class.phpmailer.php
Description: Set whether SMTP requires authentication, use Username and Password variables
$SMTPDebug property
From: PHPMailer::$SMTPDebug File: class.phpmailer.php
Description: Set whether SMTP debug output?
$SMTPKeepAlive property
From: PHPMailer::$SMTPKeepAlive File: class.phpmailer.php
Description: Do not close the connection after each sending. If true, the connection must be closed using SmtpClose()
$SMTP_PORT attribute
From: SMTP::$SMTP_PORT file: class.smtp.php
Description: Set SMTP port
$Subject property
From: PHPMailer::$Subject File: class.phpmailer.php
Description: Set the subject of the letter
Send method
From: SMTP::Send() File: class.smtp.php
Description: Start an email transmission from the specified email address
Send method
From: PHPMailer::Send() File: class.phpmailer.php
Instructions: Create an email and create a sending program. If the sending is unsuccessful, false will be returned. Please use ErrorInfo to view the error message
SendAndMail method
From: SMTP::SendAndMail() File: class.smtp.php
Description: Start an email transmission from the specified email address
SendOrMail method
From: SMTP::SendOrMail() File: class.smtp.php
Description: Start an email transmission from the specified email address
SetLanguage method
From: PHPMailer::SetLanguage() File: class.phpmailer.php
Description: Set the language type of phpmailer error message. If the language file cannot be loaded, false will be returned. The default is english
SMTP method
From: SMTP::SMTP() File: class.smtp.php
Description: Initialize an object so that the data is in a known state
SMTP Object
From: SMTP file: class.smtp.php
Description: SMTP object
SmtpClose method
From: PHPMailer::SmtpClose() File: class.phpmailer.php
Description: Close SMTP if there is one active.
Starting with T
$Timeout attribute
From: PHPMailer::$Timeout file: class.phpmailer.php
Description: Set the timeout of the SMTP server (unit: seconds). Note: Under win32, this attribute is invalid

Turn method
From: SMTP::Turn() File: class.smtp.php
Note: This is an optional SMTP parameter. Currently, phpmailer does not support it. It may be supported in the future
Starting with U
$Username attribute
From: PHPMailer::$Username File: class.phpmailer.php
Description: Set SMTP username
Starting with V
$Version attribute
From: PHPMailer::$Version file: class.phpmailer.php
Description: Return the Phpmailer version
Verify method
From: SMTP::Verify() File: class.smtp.php
Description: Check if the username is verified via the server
Starting with W:
$WordWrap Property
From: PHPMailer::$WordWrap File: class.phpmailer.php
Description: Set the maximum number of characters per line, and automatically wrap the line after exceeding the number

[ ]
D8888D’s reply content
So much, let’s do some research.
D8888D’s reply content
Good stuff to share!
D8888D’s reply content
[img]http://www.phpchina.com/bbs/images/smilies/default/15.gif[/img]

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/632529.htmlTechArticleAll objects and attributes of phpmailer Original Chinese translation phpmailer users must read the solution Preface: phpmailer is an excellent sender program, but there is relatively little Chinese information, so I manually...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn