4

我有一个具体的问题。我正在处理的网站之一在 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  
4

1 回答 1

1

所以问题终于解决了。在我负责本地邮件服务器的同事帮助分析后,我们发现问题出在 SMTP 认证的用户名上。

我很困惑,因为它不是 smtpuser@localmailserver.com (我指的是我制作的示例),而是 smtpuser@localdomainname.com

因此,对于有类似问题的其他人的建议,尝试将测试帐户(您用于身份验证的帐户)添加到您的电子邮件客户端(即 Thunderbird),一旦没问题,您就有了正确的凭据。还可以尝试从该帐户在其他地方发送邮件。

于 2014-03-20T07:41:12.810 回答