It is roughly as follows:
1. The POP3 object is an operation on the POP3 email receiving server.
2. Messages object is an object related to the mail collection.
3. Message object is an object related to mail. It is the most commonly used object of Jmail component. It can send email information and receive email information.
4. The header object is an object related to the email header.
5. The Recipients object is an object related to the collection of receiving mails.
6. The Recipient object is the object related to receiving mail.
7. Attachments object is an object related to a collection of mail attachments.
8. Attachment object is an object related to the attachment of the message.
9. The MailMerge object is an object related to the mail template.
10. The PGPKeys object is an object related to the mail PGP key collection.
11. The PGPKeyInfo object is an object related to the PGP key information of the email.
...
In web applications sent by email, Message objects are the most commonly used. Before using them, you need to create the object and assign it to a variable.
Set jmail = Server.CreateObject("JMAIL.Message") |
There are the following commonly used properties and methods for Message objects:
1. Silent attribute indicates that the exception error is blocked and returns the FALSE or TRUE value. When the value is TRUE, it means that the error will be ignored by the email sending and the error message will not be returned to the operating system.
jmail.silent = true
2. Logging attribute indicates whether logging is enabled.
jmail.logging = true
3. Charset attribute, set the character set displayed by email, GB2312 can be used in simplified Chinese.
jmail.Charset = "GB2312"
4. ContentType attribute, indicating the type of the email body.
jmail.ContentType = "text/html"
5. AddRecipient method, indicating the recipient's E-Mail address.
jmail.AddRecipient ("[email protected]")
6. From attribute, indicating the sender's E-Mail address. This address is generally the same as the login account required when using the SMTP server to verify.
jmail.From = "[email protected]"
7. FromName attribute, indicating the sender's name.
jmail.FromName = "BruceWolf"
8. Subject property, indicating the title of the sending email.
jmail.Subject = "This is the title of the email"
9. Body attribute, which indicates the content of the sending email. You can use HTML tag code
jmail.Body = "This is the content of the email<br>The content of the line break is displayed"
10. Priority attribute indicates the priority of sending emails. 1 is the fastest, 5 is the slowest, and 3 is the default value.
jmail.Priority = 1
11. The MailServerUserName property represents the login account set when the mail server uses SMTP to send a message verification.
jmail.MailServerUserName = "[email protected]"
12. The MailServerPassword property indicates the login password set when the mail server uses SMTP to send a message verification.
jmail.MailServerPassword = "***************"
13. Send method, which means sending mail through the specified mail sending server. It should be noted that the mail server address is consistent with the values in MailServerUserName and MailServerPassword.
jmail.Send("smtp.126.com")
14. The Close method represents the cache space used to free Jmail and the mail server connection.