本文介绍了经典的ASP,发送电子邮件错误'8004020f“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我得到的错误,当我发送邮件
Here my code.
Set cdoConfig = Server.CreateObject( "CDO.Configuration")
cdoConfig.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
cdoConfig.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="mail.dartconsulting.info"
cdoConfig.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
cdoConfig.Fields.Update
Set cdoMessage = Server.CreateObject ("CDO.Message")
Set cdoMessage.Configuration = cdoConfig
cdoMessage.From = "[email protected]"
cdoMessage.To=email
cdoMessage.Subject = "Your Password"
cdoMessage.HtmlBody = "<table><tr><td></td></tr>"&_
"<tr><td colspan=2>Please find below your password</td></tr>"&_
"<tr><td>Password : "&password&"</td></tr>"&_
"<tr><td>UserName : "&uid&"</td></tr>"&_
"<tr><td>EmailID : "&email&"</td></tr>"&_
"<tr><td colspan=2>Please login and confirm/change your emailid</td></tr><table>"
cdoMessage.Send
Set cdoMessage = Nothing
Set cdoConfig = Nothing
解决方案
There isn't enough information in your post to solve the problem, as Vogel612 said. However, by far the most likely cause is that the server mail.dartconsulting.info
requires authentication, while you are trying to send without authentication.
I have connected to this server from my local computer and it gave me 550 Authentication is required for relay
, so even if you're located on the same server there's a high likelihood that you also need to be authenticated.
Please refer to this website:http://www.powerasp.net/content/new/sending_email_cdosys.asp(or do a Google search) on how to send email with CDO with authentication.
这篇关于经典的ASP,发送电子邮件错误'8004020f“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!