List of main jmail Parameters

Source: Internet
Author: User

List of main jmail Parameters
-----------------
(1) Body (letter body): String
For example, jmail. Body = "the content of the Form filled by the user can be taken from. "
(2) charset (character set, default: "US-ASCII"): String
Example: jmail. charset = "US-ASCII"
(3) contenttransferencoding: String
Specifies the encoding method for content transfer. The default value is "quoted-printable"
For example, jmail. contenttransferencoding = "base64"
(4) contenttype (contentype of a letter. The default value is "text/plain"): String
If you send an email in HTML format, change it to text/html.
For example, jmail. contenttype = "text/html"
(5) encoding: String
Set the attachment encoding method (default value: "base64 ). You can choose to use "base64", "uuencode" or "quoted-printable"
For example, jmail. Encoding = "base64"
(6) log (for logs created by jmail, set the loging attribute to true, as shown below): String
For example, use the response. Write (jmail. Log) statement to list log information.
(7) logging (whether to use logs): Boolean
For example, jmail. Logging = true
(8) recipients: String
Read-only attribute. All recipients are returned.
For example: Response. Write ("" + jmail. Recipients + "");
(9) replyto (specify another return address): String
Example: jmail. replyto = "qiao198@hotmail.com"
(10) sender (sender's email address): String
Example: jmail. Sender = "qiao198@21cn.com"
(11) sendername (sender's name): String
Example: jmail. sendername = "1G"
(12) serveraddress (email server address): String
You can specify multiple servers and open them with a semicolon. You can specify the port number.
If serveraddress remains blank, jmail will attempt to remotely mail the server and then directly send it to the server.
For example, jmail. serveraddress = "mail.21cn.net.cn"
(13) Subject (set the mail title, which can be taken from .) : String
Example: jmail. Subject = "customer feedback form"
(14) add file attachments to emails
For example, jmail. addattachment ("C: \ anyfile.zip ")
(15) addcustomattachment (filename, data)
Add a custom attachment.
For example, jmail. addcustomattachment ("anyfile.txt", "Contents of file ");
(16) addheader (header, value)
Add a custom mail header.
For example, jmail. addheader ("originating-IP", "192.158.1.10 ");
(17) addrecipient (recipient): String
Example: jmail. addrecipient ("qiao198@hotmail.com ");
(18) addrecipientbcc (email), bcc recipient:
Example: jmail. addrecipientbcc ("qiao198@hotmail.com ");
(19) addrecipientcc (email), CC recipient:
For example, jmail. addrecipientcc ("")
(20) addurlattachment (URL, document name)
Download and add an attachment from the URL. The second parameter "document name" is used to specify the file name after the letter is received.
Example: jmail. addurlattachment ("http://www.chinabs.net/jmail.zip", "jmail ")
(21) appendbodyfromfile (File Name:
For example, jmail. appendbodyfromfile ("C: \ anyfile.txt ")
(22) appendtext (text)
Append the text of a letter, such as adding a greeting or other information.
For example: jmail. appendtext ("welcome to this site! ")
(23) Close (), Force jmail to close the buffer connection to the mail server:
For example, jmail. Close ()
(24) execute (), execute mail sending
Example: jmail. Execute ()

 

The following is an example of the password that you forgot.ProgramCode:
Path = server. mappath ("\ images \ logo.gif ")
Set jmail = server. Createobject ("jmail. smtpmail ")
Jmail. contenttype = "text/html"
Jmail. Encoding = "base64"
Jmail. charset = "gb2312"
Jmail. serveraddress = "mail.chinabs.net"
Jmail. Sender = qiao198@sina.com
Jmail. Subject = "chinabs.net password! "
Jmail. addrecipient (email)
Jmail. Body = Str
Jmail. addheader "originating-IP", request. servervariables ("remote_addr ")
Jmail. addattachment (PATH)
Jmail. Execute
Jmail. Close
Set jmail = nothing

 

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.