JMail Send mail code

Source: Internet
Author: User
Tags mail mail code
jmail| Send Mail On Error Resume Next
Dim JMail, ContentID
Set JMail = Server.CreateObject ("Jmail.message")
Jmail.charset = "gb2312"



Jmail.from = "Goaler@goalerCN.com"
Jmail.fromname = "Goaler"
Jmail.subject = "JMail messages sent automatically"


Jmail.mailserverusername = "Goaler@goalerCN.com"
Jmail.mailserverpassword = "**********"


Jmail.priority = 3

Jmail.addheader "Originating-ip", Request.ServerVariables ("REMOTE_ADDR")


Friendemail= "User@163.com"
Jmail.addrecipient (Friendemail)

' Add attachment ' variable filename: The absolute address of the attachment file to ensure that the user IUSR_ the machine name has access permission "
' "Parameter setting is (True) No (False) is inline mode"
' ContentID = jmail.addattachment (Server.MapPath ("jmail.asp"), True)


Mailbody = mailbody & "Mailbody = Mailbody & "Mail Content"
Mailbody = mailbody & "</body>Jmail.htmlbody = Mailbody


Jmail.body = "Our mail is in HTML format, but your mail viewing software may not support ... "

' Send ' call format: Objjmail.send ([username:password@]smtpserveraddress[:P ort])
' Jmail.send ("mail.guxido.com")
Jmail.send ("mail.goalerCN.com")


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.