Phpmailer attributes and methods (phpmailer reference)

Source: Internet
Author: User

Start with:

$ Altbody -- attribute

From: phpmailer ::$ altbody, file: class. phpmailer. php

Note: the setting of this attribute is that HTML standby display is not supported in the mail body.

Addaddress -- Method

From: phpmailer: addaddress (), file: class. phpmailer. php

Note: add recipients. Parameter 1 is the recipient's mailbox, and parameter 2 is the recipient's name. Example addaddress ("mailto: xiaoxiaoxiaoyu@xiaoxiaoyu.cn % 22, % 22 xiaoxiaoyu"), but parameter 2 is optional, addaddress (xiaoxiaoxiaoyu@xiaoxiaoyu.cn) is also possible. Function prototype:

Public Function addaddress ($ address, $ name = ''){}

Addattachment -- Method

From: phpmailer: addattachment (), file: class. phpmailer. php

Note: Add attachments. Parameter: path, name, encoding, type. The path is required, and the others are optional.

Function prototype:

Addattachment ($ path, $ name = '', $ encoding = 'base64', $ type = 'application/octet-stream '){}

Addbcc -- Method

From: phpmailer: addbcc (), file: class. phpmailer. php

Note: Add a BCC. For the differences between CC and BCC, see [differences between BCC and CC in SMTP sending]. Parameter 1 is the address and parameter 2 is the name. Note that this method only supports SMTP in Win32 and does not support the mail function.

Function prototype:

Public Function addbcc ($ address, $ name = ''){}

Addcc -- Method

From: phpmailer: addcc (), file: class. phpmailer. php

Note: Add a CC. For the differences between CC and BCC, see [differences between BCC and CC in SMTP sending]. Parameter 1 is the address and parameter 2 is the name. Note that this method only supports SMTP in Win32, but does not support the mail function.

Function prototype:

Public Function addcc ($ address, $ name = ''){}

Addcustomheader -- Method

From: phpmailer: addcustomheader (), file: class. phpmailer. php

Note: Add a custom email header. The parameter is the header information.

Function prototype:

Public Function addcustomheader ($ custom_header ){}

Addembeddedimage -- Method

From: phpmailer: addembeddedimage (), file: class. phpmailer. php

Note: add an embedded image. Parameter: path, return handle [, name, encoding, type]

Function prototype:

Public Function addembeddedimage ($ path, $ CID, $ name = '', $ encoding = 'base64', $ type = 'application/octet-stream '){}

Tip: addembeddedimage (picture_path. "index_01.jpg", "img_01", "index_01.jpg ");
Reference

Addreplyto -- Method

From: phpmailer: addreplyto (), file: class. phpmailer. php

Note: Add a reply tag, such as "reply-". Parameter 1 Address, parameter 2 Name

Function prototype:

Public Function addreplyto ($ address, $ name = ''){}

Addstringattachment-Method

From: phpmailer: addstringattachment (), file: class. phpmailer. php

Description; add a string or binary attachment (adds a string or binary attachment (non-filesystem) to the list .?) Parameter: String, file name [, encoding, type]

Function prototype:

Public Function addstringattachment ($ string, $ filename, $ encoding = 'base64', $ type = 'application/octet-stream '){}

Authenticate -- Method

From: SMTP: Authenticate (), file: class. SMTP. php

Note: To start SMTP authentication, it must be called after hello (). If the authentication succeeds, true is returned. Parameter 1 user name, parameter 2 Password

Function prototype:

Public Function authenticate ($ username, $ password ){}

Start with B

$ Body -- attribute

From: phpmailer ::$ body file: class. phpmailer. php

Description: email content, in HTML or text format

C

$ Charset -- attribute

From: phpmailer ::$ charset file: class. phpmailer. php

English version (Mail encoding, the default is iso-8859-1)

$ Confirmreadingto -- attribute

From: phpmailer ::$ confirmreadingto File class. phpmailer. php

Note: receipt?

$ Contenttype -- attribute

From: phpmailer ::$ contenttype file: class. phpmailer. php

Description: document type. The default value is "text/plain"

$ CRLF -- attribute

From: phpmailer ::$ contenttype file: class. phpmailer. php

Note: 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: SMTP objects

Clearaddresses -- Method

From: phpmailer: clearaddresses () file: class. phpmailer. php

Note: Clear the recipient to prepare for the next sending. The return type is void.

Clearallrecipients -- Method

From: phpmailer: clearallrecipients () file: class. phpmailer. php

Note: Clear all recipients, including CC (CC) and bcc (BCC)

Clearattachments -- Method

From: phpmailer: clearattachments () file: class. phpmailer. php

Note: Clear attachments

Clearbccs -- Method

From: phpmailer: clearbccs () File class. phpmailer. php

Note: Clear BCC)

Clearcustomheaders -- Method

From: phpmailer: clearcustomheaders () file: class. phpmailer. php

Note: Clear Custom Headers

Clearreplytos -- Method

From: phpmailer: clearreplytos () file: class. phpmailer. php

Note: Clear the respondent

Close -- Method

From: SMTP: Close () file: class. SMTP. php

Disables an SMTP connection.

Connect -- Method

From: SMTP: connect () file: class. SMTP. php

Creates an SMTP connection.

From: http://www.xiaoxiaoyu.cn/AMP/215.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.