【 tulaoshi.com - ASP 】
一个用jmail发信的过程,及使用方法.
发信时,直接调用这个过程就行了。
(本文来源于图老师网站,更多请访问http://www.tulaoshi.com/asp/)<%
dim str,HtmlBody
HtmlBody=
"<html<body bgcolor='red' topmargin='40'<p align='center'I Love 2Yup!</p</html"
str=JmailSend(
"hello",
"ILoveYou",
true,HtmlBody,
"youname@domain.com",
youname@sina.com,
"hello",
"smtp.sina.com.cn",
"hello",
"Password")
if str=
"Y" then
response.
write(
"发送成功")
else
response.
write(
"发送失败!请重试!")
end if
function JmailSend(Subject,Body,isHtml,HtmlBody,MailTo,From,FromName,Smtp,Username,Password)
dim JmailMsg
set JmailMsg=
server.
createobject(
"jmail.message")
JmailMsg.mailserverusername=Username
JmailMsg.mailserverpassword=Password
JmailMsg.addrecipient MailTo
JmailMsg.from=From
JmailMsg.fr