这是我写的邮件发送代码,提示是发送成功的,但是为什么却收不到邮件呢?
先谢谢各位了。。
jmail=1
adm_mail="caor1987@126.com"
qf_mailyesorno=1
mailserver="mail.126.com"
mailname="caor1987@126.com"
mailpassword="******"
if qf_mailyesorno=1 then
dim msg
if jmail=0 then
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.To = email
objMail.From =mailname
objMail.Subject = mail_subject
objMail.Body = mail_body
objMail.Send
Set objMail = Nothing
else
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 = "曹仁"
user_mail=split(email,";") 'email为我所发送的邮箱地址
for N=0 to UBound(user_mail)
msg.AddRecipient user_mail(n)
next
msg.Subject = mail_subject
msg.Body = mail_body
msg.Send (mailserver)
msg.close
set msg = nothing
end if
response.write "<script language='javascript'>"
response.write "alert('恭喜,邮件已经发出。');"
response.write "location.href='email_user.asp';"
response.write "</script>"
response.end
else
response.write "<script language='javascript'>"
response.write "alert('抱歉,邮件功能没有打开。');"
response.write "location.href='user3.asp';"
response.write "</script>"
response.end
end if