用Jmail实现ASP程序自动发送邮件和邮件群发
作者:wang 日期:2009-11-04
<%
mailserver="smtp.sina.com.vn" 'smtp服务器地址
mailname="111111@sina.com" '发信邮箱
mailpassword="这里填写密码" '发信邮箱密码
dim msg
CLStr=Chr(13) & Chr(10)
Set msg = Server.CreateObject("JMail.Message")
msg.silent = true
msg.Logging = true
msg.Charset = "gb2312"
msg.MailServerUserName = mailname
msg.MailServerPassword = mailpassword
msg.From = mailname
msg.FromName = mailname
msg.AddRecipient (UserMail) 'usermail为网站会员注册时填写的ID
msg.Subject = "您在“"&sitename&"”注册成功"
msg.Body = UserName&",您好!"&CLStr&CLStr
msg.Body = msg.Body&"恭喜您注册会员成功,会员ID:"&userid&",登陆密码:"&user_password&CLStr&CLStr
msg.Body = msg.Body&sitename&"("&siteurl&")欢迎您多多光临!谢谢!"&CLStr
msg.Send (mailserver)
msg.close
set msg = nothing
%>
这个测试过,ok
ASP实现邮件群发
<%
function SendMail(subject,msg)
dim JMail
'on error resume next
Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.LazySend = true
JMail.silent = true
JMail.Charset = "gb2312"
JMail.ContentType = "text/html"
JMail.Sender = "1111@sina.com"
JMail.ReplyTo = "1111@sina.com"
JMail.SenderName = "sina"
JMail.Subject = subject
JMail.SimpleLayout = true
JMail.Body = msg
JMail.Priority = 1
aryEmail = split(textemail1, ";")
for i=0 to UBound(aryEmail)
JMail.AddRecipient Trim(aryEmail(i))
next
JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
SendMail = JMail.Execute()
JMail.Close
set JMail=nothing
end function
%>
mailserver="smtp.sina.com.vn" 'smtp服务器地址
mailname="111111@sina.com" '发信邮箱
mailpassword="这里填写密码" '发信邮箱密码
dim msg
CLStr=Chr(13) & Chr(10)
Set msg = Server.CreateObject("JMail.Message")
msg.silent = true
msg.Logging = true
msg.Charset = "gb2312"
msg.MailServerUserName = mailname
msg.MailServerPassword = mailpassword
msg.From = mailname
msg.FromName = mailname
msg.AddRecipient (UserMail) 'usermail为网站会员注册时填写的ID
msg.Subject = "您在“"&sitename&"”注册成功"
msg.Body = UserName&",您好!"&CLStr&CLStr
msg.Body = msg.Body&"恭喜您注册会员成功,会员ID:"&userid&",登陆密码:"&user_password&CLStr&CLStr
msg.Body = msg.Body&sitename&"("&siteurl&")欢迎您多多光临!谢谢!"&CLStr
msg.Send (mailserver)
msg.close
set msg = nothing
%>
这个测试过,ok
ASP实现邮件群发
<%
function SendMail(subject,msg)
dim JMail
'on error resume next
Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.LazySend = true
JMail.silent = true
JMail.Charset = "gb2312"
JMail.ContentType = "text/html"
JMail.Sender = "1111@sina.com"
JMail.ReplyTo = "1111@sina.com"
JMail.SenderName = "sina"
JMail.Subject = subject
JMail.SimpleLayout = true
JMail.Body = msg
JMail.Priority = 1
aryEmail = split(textemail1, ";")
for i=0 to UBound(aryEmail)
JMail.AddRecipient Trim(aryEmail(i))
next
JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
SendMail = JMail.Execute()
JMail.Close
set JMail=nothing
end function
%>
上一篇: 展望、沸腾、整合论坛版本
下一篇: 利用ASP+JMAIL进行邮件群发的新思路简单快捷实现ASP在线发邮件功能
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
下一篇: 利用ASP+JMAIL进行邮件群发的新思路简单快捷实现ASP在线发邮件功能
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 0 | 引用: 0 | 查看次数: 2859
发表评论