【问题标题】:ASP: SMTP authentification fails with JMailASP:使用 JMail 的 SMTP 身份验证失败
【发布时间】:2014-03-11 09:39:29
【问题描述】:

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

【问题讨论】:

  • Jmail 是第三方组件。在 Classic ASP 中发送消息的标准方法是使用 CDOSYS。我并不是说这是一种更好的方法,但可能有更多关于如何配置它的信息 - 例如powerasp.net/content/new/sending_email_cdosys.asp

标签: authentication asp-classic smtp jmail


【解决方案1】:

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

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-10-09
    • 2015-10-14
    • 2013-02-06
    • 2019-03-14
    • 2017-01-31
    • 1970-01-01
    • 2012-06-16
    • 1970-01-01
    相关资源
    最近更新 更多