如果电子邮件包含 URL - 经典 ASP,则电子邮件不会通过



我们有一个目录类型的网站托管在 godaddy.com 用经典asp开发的。非常基本,没有花里胡哨的东西。在其他函数中,我们有一小段代码用于向朋友推荐目录中的项目,这相当简单。

此功能突然停止工作,即使没有进行任何代码更改,电子邮件建议也不会发出。也没有错误消息或电子邮件退回!

godaddy 支持没有进展,但现在已经能够识别问题,似乎是电子邮件消息正文中的嵌入式 url/链接导致它失败。

关于如何绕过任何限制或解决此问题的任何想法?

谢谢!

Dim objNewMail, sBody
Set objNewMail = Server.CreateObject("CDO.Message")
objNewMail.From = Request.Form("Your email address")
objNewMail.Cc = Request.Form("Your email address")
objNewMail.To   = Request.Form("Email to")
objNewMail.Subject = "Interesting property sent by " & Trim(Request.Form("Your name"))
sBody = Trim(Request.Form("Your name")) & " wants to show you an interesting property listed by " & vbcr & vbcr
sBody = sBody & "Example Properties Ltd, Malta" & vbcr & vbcr
sBody = sBody & "Click the following link to see the property :" & vbcr & vbcr & "http://www.example.com/default.asp?pid=" & Request.Form("pid")
If Request.Form("Message") <> "" Then
    sBody = sBody & vbcr & vbcr & "Message from : " & Request.Form("Your Name") & vbcr & vbcr & Request.Form("Message")
End If
objNewMail.TextBody = sBody
' GoDaddy SMTP Settings
objNewMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
objNewMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="relay-hosting.secureserver.net"
objNewMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25 
objNewMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
objNewMail.Configuration.Fields.Update
objNewMail.Send
'After the Send method, NewMail Object become Invalid
Set objNewMail = Nothing

似乎问题不在于电子邮件消息正文中的代码或 url,而在于 url 中提到的特定网站,这些网站一定以某种方式最终被列入了某个黑名单!很抱歉误报,并将其留在这里,以防对其他人有用。

最新更新