JMail is a Third-party messaging component, usually located on the Web server side, that works closely with the site program to receive and submit mail to the mail server's controls, giving the site the ability to send and receive messages.
The function of using JMail in ASP is the following:
The code is as follows |
Copy Code |
Sub sendaction (Subject,mailaddress,tomail,content,fromemail,fromer,username,password) Set ojmail=createobject ("Jmail.message") Ojmail.logging=true Ojmail.silent=false ojmail.priority = 1 Ojmail.fromname=fromer Ojmail.from= Fromemail ojmail.charset= "gb2312" Ojmail.mailserverusername = UserName Ojmail.mailserverpassword = PassWord ojmail.contenttransferencoding = "Base64" Ojmail.htmlbody = Content ' Message contents Ojmail.body =content ' "Our messages are in HTML format, but your mail viewing software may not support ' Single address recipient Ojmail.addrecipient Tomail ' recipient address Ojmail.subject = Subject ' title Ojmail.send (MailAddress) End Sub |
To be specified in an ASP program and submitted to JMail processing
Often needs to be sent to multiple addressee mailboxes.
As follows:
The code is as follows |
Copy Code |
Jmail.addrecipient "Somebody1@somewhere.com" Jmail.addrecipient "Somebody2@somewhere.com" Jmail.addrecipient "Somebody3@somewhere.com"
|
As far as I know, you should not, you can use a loop to set.
code is as follows |
copy code |
Aryemail = Split ("aa@bb.com;adf@sfda.net;dsfafdsa@china.com", ";") for I=0 to UBound (aryemail) jmail.addrecipient Trim (Aryemail (i)) Next |