on error resume next
body= "66666s "
MailServerUserName= "dfboyxing@126.com "
MailServerPassword= "111111 "
mailaddress= "dfboyxing@sina.com "
mailtopic= "你好 "
body=Request.Form( "Mailbody ")
smtpmail= "dfboyxing@126.com "
smtp= "smtp.126.com "
Set JMail=Server.CreateObject( "JMail.Message ")
JMail.Charset= "gb2312 "
jmail.ContentType = "text/html "
JMail.AddRecipient mailaddress
JMail.Subject = mailtopic
JMail.Body = body
JMail.From = smtpmail
JMail.MailServerUserName = MailServerUserName
JMail.MailServerPassword = MailServerPassword
JMail.Send smtp
Set JMail=nothing
If Err Then
Response.Write "邮件发送失败!错误原因: " & Err.Description & " <br> "
else
.......
怎么测试都提示这个错误
邮件发送失败!错误原因:The message was undeliverable. All servers failed to receive the message
兄弟们帮帮忙啊,弄了一上午了.
------解决方案--------------------
如果系统是win2003的话,比较麻烦,因为在win2000里面,jmail 发送邮件的进程是 dllhost.exe 在win2003里面发送邮件进程是 w3wp.exe,所以在杀毒软件要设置允许w3wp.exe 这个进程发邮件