我有一个具体的问题。我正在处理的网站之一在 ASP 上运行并获取表单,其结果通过电子邮件发送到特定地址。
为此,使用了JMail 组件。只要在本地发送电子邮件(比如说通过邮件服务器 mail.clientserver.com 发送到 user@clientserver.com),就没有问题,也不需要进行身份验证。但是,我最近收到要求将另一个地址添加到副本(copy@differentserver.com),这就是问题发生的时候。
首先,我尝试添加身份验证,但是在没有时仍然发生相同的错误:
jmail.Message 错误“8000ffff”
消息无法送达。所有服务器均收不到消息
我尝试了谷歌解决方案,对一些贵重物品进行了锻炼。我确定用户和密码是正确的,当我没有尝试发送带有身份验证的邮件时,邮件服务器地址也有效。
由于我更喜欢 PHP,我对 ASP 的知识和技能并不是最好的。有人遇到过类似的事情并解决了吗?或者有人知道其他解决方案吗?
用于发送邮件的代码:
set msg = Server.CreateOBject( "JMail.Message" )
msg.Charset = "windows-1250"
msg.Logging = true
msg.From= "from@mail.com"
msg.FromName= name&" - "&mail
'those should care of smtp auth
msg.MailServerUserName = "smtpuser@localmailserver.com"
msg.MailServerPassword = "smtppass"
'local mail address
msg.AddRecipient "user@localmailserver.com"
'outside mail address
msg.AddRecipient "address@differentmail.com"
msg.Subject = "Some subject"
msg.Body = "Some text"
if not msg.Send( "mail.localmailserver.com" ) then
Response.write "<pre>" & msg.log & "</pre>"
else
'Succesfully sent, redirect
Response.Redirect("mailjob_sent.asp")
end if