Use jmail to send emails in ASP

Source: Internet
Author: User
First, we will share the two tested and fast-paced messages sent by jmail. Program Because there are many shares on the Internet, but the success rate is not the same;
1. It is suitable for you to have a free 163 mailbox, which is very fast!

<%
Tbody = ""
Tbody = tbody + "hello," & clientname & "left a message for you :"
Tbody = tbody + "<br> single-bit:" & clientweb
Tbody = tbody + "<br> Tel:" & clientoicq
Tbody = tbody + "<br> address:" & clientaddress
Tbody = tbody + "<br> E-mail:" & clientemail
Tbody = tbody + "<br> content:" & bookbody
Tbody = tbody & "<br> ------------------------------------ <br> responsibility-hard work-thinking <br> close-to-person services from the vision network"

Set jmail = server. Createobject ("jmail. Message") 'creates the email sending object.
Jmail. Silent = true' to block exception errors. The values false and true are returned. j
Jmail. Logging = true' enable Mail Log
Jmail. charset = "gb2312" 'the text of the email is encoded as the national standard
Jmail. contenttype = "text/html" 'the mail format is html
Jmail. addrecipient "qingzhouboy@163.com" 'email recipient's address
Jmail. From = "qingzhouboy@163.com" 'sender's E-MAIL address
Jmail. mailserverusername = "qingzhouboy" 'username required to log on to the email server
Jmail. mailserverpassword = "198137" 'Password required to log on to the email server
Jmail. Subject = "depending on the network" 'mail title
Jmail. Body = tbody 'mail content

Jmail. Send ("smtp.163.com") 'executes the mail sending (via the mail server address)
Jmail. Close () 'Close the object
Set jmail = nothing
Response. Write "sent successfully"
%>


2. Suitable for enterprises that have their own enterprise post offices. I tested 35 interconnected enterprise post offices, which are incredibly fast.

<%
'Metric data description
'Subject: Subject
'Mailaddress: the address of the sending server, such as smtp.163.com.
'Email: Recipient's email address
'Sender: sender's name
'Content: Internal content
'Fromer: Producer address

Sub sendaction (subject, email, sender, content)
Set jmail = server. Createobject ("jmail. Message ")
Jmail. charset = "gb2312" 'courier Character Set, recognized as "US-ASCII"
Jmail. From = strmailuser 'sender address
Jmail. fromname = sender' sender name
Jmail. Silent = true
Jmail. Logging = true
Jmail. Subject = subject
Jmail. mailserverusername = strmailuser' indicates the registrant name of the Identity Authentication.
Jmail. mailserverpassword = strmailpass 'password of the identity authentication card
Jmail. Priority = 3
Jmail. addrecipient (email)
Jmail. Body = strcontent
Jmail. Send (strmailaddress)
End sub
'Using this sub example
Dim strsubject, stremail, strmailadress, strsender, strcontent, strfromer
Strsubject = "www.wfzhuji.cn"
Strcontent = "www.wfzhuji.cn"
Strsender = "www.wfzhuji.cn"
Stremail = "" & request ("m_email ")&""
'This is the email address.
Strmailaddress = "mail.yongxingfangshui.com" 'address of our enterprise ICP filing Bureau. Please use mail. Your Domain Name
Strmailuser = "yongxing@yongxingfangshui.com" 'name of our corporate website
Strmailpass = "password" 'secret password used by the local authority
Call sendaction (strsubject, stremail, strsender, strcontent)
%>

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.