ASP through JMail implementation of universal Send function _ Application techniques

Source: Internet
Author: User
<%
'******************************
' Function: SendMail (mailtoaddress,mailtoname,subject,mailbody,fromname,mailfrom,priority)
' Parameters: Mailtoaddress, receiving mail address, Mailtoname, recipient name, Ubject, subject, ailbody, mail content, Fomname, main name, Ailfrom, main mail address, riority, message level
' Author: Arisisi
' Date: 2007/7/13
' Description: JMail Universal Send function
' Example: <%=sendmail (mailtoaddress,mailtoname,subject,mailbody,fromname,mailfrom,priority)%>
'******************************
function SendMail (mailtoaddress,mailtoname,subject,mailbody,fromname,mailfrom,priority)
On Error Resume Next
Dim JMail
Set jmail=server.createobject ("Jmail.message")
If Err Then
Sendmail= "<br><li> not installed JMail components </li>"
Err.Clear
Exit function
End If
jmail.charset= "gb2312"
Jmail.silent=true
Jmail.contenttype = "Text/html"
Jmail.mailserverusername = Mailserverusername
Jmail.mailserverpassword = Mailserverpassword
Jmail.maildomain = MailDomain
Jmail.addrecipient Mailtoaddress,mailtoname
Jmail.subject=subject
Jmail.hmtlbody=mailbody
Jmail.body=mailbody
Jmail.fromname=fromname
Jmail.from = Mailfrom
Jmail.priority=priority
Jmail.send (MailServer)
SendMail =jmail.errormessage
Jmail.close
Set jmail=nothing
End function%>
Related Article

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.