请求交货收据时,将不会发送CDO消息 [英] CDO message wont send when delivery receipt requested
问题描述
我正在用经典ASP编写一个应用程序(是的,请原谅我),该应用程序使用Google Mail发送电子邮件.我让它像这样正常工作:
I'm writing an application in classic ASP (yes, please forgive me) that sends e-mails using Google Mail. I have it working just fine like this:
Dim ObjSendMail
Set ObjSendMail = CreateObject("CDO.Message")
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = SendUsername
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = SendPassword
ObjSendMail.Configuration.Fields.Update
ObjSendMail.To = "x@x.x"
ObjSendMail.From = "x@x.x"
ObjSendMail.Subject = "subject here..."
ObjSendMail.HTMLBody = "body here..."
'ObjSendMail.Fields("urn:schemas:mailheader:disposition-notification-to") = SendUsername
'ObjSendMail.Fields("urn:schemas:mailheader:return-receipt-to") = SendUsername
'ObjSendMail.Fields.Update
'ObjSendMail.DSNOptions = 14
ObjSendMail.Send
Set ObjSendMail = Nothing
当我取消注释以下行时:
When I uncomment out the following lines:
'ObjSendMail.Fields("urn:schemas:mailheader:disposition-notification-to") = SendUsername
'ObjSendMail.Fields("urn:schemas:mailheader:return-receipt-to") = SendUsername
'ObjSendMail.Fields.Update
'ObjSendMail.DSNOptions = 14
电子邮件无法发送.没有错误,没有电子邮件,也没有交货收据.我一生都想不通如何进行这项工作."SendUsername"是有效的电子邮件地址.任何帮助将不胜感激.
The e-mail fails to send. No error, just no e-mail and no delivery receipt. I can't figure out for the life of me how to make this work. "SendUsername" is a valid e-mail address. Any help would be appreciated.
推荐答案
它可能无法正常工作,因为Gmail不想让您这样做.垃圾邮件发送者经常会揭露这种事情.
Its probably not working because Gmail doesn't want you doing this. This sort of thing is often explioted by spammers.
这篇关于请求交货收据时,将不会发送CDO消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!