gpt4 book ai didi

authentication - ASP : SMTP authentification fails with JMail

转载 作者:行者123 更新时间:2023-12-04 06:39:10 25 4
gpt4 key购买 nike

我有一个具体的问题。我正在处理的网站之一在 ASP 上运行并获取表单,其结果通过电子邮件发送到特定地址。
为此, JMail 组件 用来。只要电子邮件是在本地发送的(比如通过 mailserver mail.clientserver.com 发送到 user@clientserver.com),就没有问题,也不需要身份验证。但是,我最近收到了向 copy(copy@differentserver.com) 添加另一个地址的请求,这就是问题发生的时候。
首先,我尝试添加身份验证,但是在没有时仍然出现相同的错误:

jmail.Message error '8000ffff'

The message was undeliverable. All servers failed to receive the message


我尝试了谷歌解决方案,对一些贵重元素进行了调整。我确定 user 和 pass 是正确的,当我没有尝试通过身份验证发送邮件时,邮件服务器地址也有效。
因为我更喜欢 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

最佳答案

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

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

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

关于authentication - ASP : SMTP authentification fails with JMail,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22321734/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com