' Parameter description
' strfrom: Email from sender
' Strto: Recipient email
' Strsubject: The subject of the letter
' Strbody: Letter Text
' Lngimportance: The importance of letters
': 0-Low importance
': 0-Medium importance (default)
': 0-High importance
' Lngatype: Letter Format
': The message body is used as HTML for 1 o'clock (you can send HTML messages at this time)
' Strattach: Path to Attachment
Sub SendMail (Strfrom, Strto, Strsubject, Strbody, Lngimportance, Lngatype, Strattach)
Dim objmail
Set objmail = Server.CreateObject ("CDONTS. NEWMAIL ")
With objmail
. From = Strfrom
. to = Strto
. Subject = Strsubject
. BODY = Strbody
. Importance = Lngimportance
If Lngatype = 1 Then
. BodyFormat = 0
. MailFormat = 0
End If
If IsEmpty (Strattach) = False and IsNull (Strattach) = False Then
. Attachfile Strattach
End If
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