【发布时间】: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