Use ASP's JMail component to send mail

Source: Internet
Author: User

JMail components

Dimac Company's Mail transceiver component, which is a very mature and powerful mail component. It can not only complete the work of sending mail, but also pop to receive letters, and support the message when the PGP encryption, built-in a mass mailing object, can make mass programming simpler.

Even if many other components can be completed by the outgoing mail function, the completion of the JMail can be called the best, in addition to the common CC-BCC and other multiple-recipient features, it also supports the addition of embedded picture attachments, and can read files from the URL as an attachment.

The free version of JMail has all the outgoing mail features that are limited in terms of email and encrypted mail that we don't normally use.

Free version Download | V4 Chinese manual Download (PDF) | SmtpMail Object Chinese reference Download (PDF) | Official website Www.dimac.net

(Note that PDF electronic documents are read using Adobe Acrobat Reader.) )

Here is an example of calling the JMail component to send messages online in an ASP program:

<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "> <%if request (" action ") =" send "then%> <% ' parameter description ' Subject: Message title ' MailAddress: Address of the outgoing server, such as  Smtp.163.com ' Email: recipient email address ' Sender: Sender name ' content: Message contents ' Fromer: Sender's email address Sub sendaction (subject, email, Sender, Content) Set JMail = Server.CreateObject ("jmail.message") Jmail.charset = "gb2312" ' message character set, default to ' us-ascii ' Jmail.from = str Mailuser ' sender Address Jmail.fromname = Sender ' sender name Jmail.subject =subject jmail.mailserverusername = Strmailuser ' Authenticated user name JM Ail. Mailserverpassword = Strmailpass ' authenticated password jmail.priority = 3 jmail.addrecipient (email) jmail.body = Content Jmail.send (St rmailaddress) End Sub ' calls this sub's example Dim strsubject,stremail,strmailadress,strsender,strcontent,strfromer strSubject = Req Uest ("title") strcontent = "User email:" & Request ("from") & VbCrLf & "Tel:" & Request ("Tel") & VbCrLf &am P "Content:" & vbCrLf & Request ("content") Strsender = Request ("Name") Stremail = "Anybody@163.com "' This is the address of the receiving letter, can be changed to other mailbox strmailaddress =" Mail.yourdomain.com "' Our company's mail address, please use mail. your domain Strmailuser =" User@yourdomain.com "' Our enterprise Post Office user name Strmailpass =" MailPassword "' Post Office User password call SendAction (strsubject,stremail,strsender,st
rcontent)%> <script language= "JavaScript" > Alert (' Congratulations, send success! ')
History.back (); </script> <%else%> <style type= "Text/css" > <!--body {margin-top:0px;margin-bottom:0px;} TD {Font-size:12px; text-decoration:none;} --></style> <table width= border= "0" align= "center" cellpadding= "1" cellspacing= "1" bgcolor= "#666666 "> <tr><td height=" bgcolor= "#E3E3E3" ><div align= "center" > Email us </div></td> </tr> <tr><td background= "images/formmail_r2_c1.gif ><table width=" 100% "height=" 296 "border="
0 "align=" center "cellpadding=" 1 "cellspacing=" 1 "> <form name=" form "method=" post "action="? Action=send "> <tr bgcolor= "#FFFFFF" > <td width= "Align"= "Center" ><div align= "left" > Message theme (title) *</div></td> <td width= "><input name=" Title "type=" text "id=" title "Size=" > Name (name) <input name= "name" type= "text" id= "name" size= "8" > </td > </tr> <tr bgcolor= "#FFFFFF" > <td align= "center" ><div align= "left" > Your mailbox (mailaddress) * </div></td> <td><input name= "from" type= "text" id= "from" size= "> Telephone (tel) <input name=" Tel "type=" text "id=" tel "size=" ></td> </tr> <tr bgcolor= "#FFFFFF" > <td height= "213" align= " Center "><div align=" left > Contents (content):*<br> </div></td> <td><textarea name= " Content "cols=" rows= "></textarea></td> </tr> <tr bgcolor=" #FFFFFF "> <td> < /td> <td> <input type= "Submission" name= "submit" value= "submitted" ></td></tr></form></ table></td> </tr></table> <%end if%>

This article supporting source code: http://www.bianceng.net/aspym/201212/782.htm

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.