用法示意如下:
<%@LANGUAGE="VBSCRIPT"%>
<%
option explicit
dim DbConn,connstr,db
Email配置信息
dim SmtpHost, AdminName, AdminEmail, NeedAuth, EmailAccount, EmailPW
SmtpHost="smtp.263.net"
AdminEmail="[email protected]"
NeedAuth=true 是否需要认证
EmailAccount="hubdog"
EmailPW="XXXX"
AdminName="管理员"
发送email
function SendMail(Email, Subject, Body)
set MailSender=Server.CreateObject("IndyMail.MailSender")
MailSender.SetBody Body
MailSender.SetFrom """"+AdminName+""" <"+AdminEmail+">"
MailSender.SetHost SmtpHost
MailSender.SetAuth NeedAuth
MailSender.SetSenderName EmailAccount
MailSender.SetSenderPW EmailPW
MailSender.SetSubject Subject
MailSender.SetTo Email
SendMail=MailSender.Send
end function
%>