使用Gmail通過ASP發送郵件時,我得到這個錯誤,我已經使用的端口465,587和25相同的結果無法將消息發送到SMTP服務器。傳輸錯誤0x80040217
昏暗的郵件 暗淡EMAIL2作爲字符串 昏暗urlms作爲字符串
Dim mail
dim email2 as string
dim urlms as string
\t \t \t \t
mail = CreateObject("CDO.Message") \t \t \t
urlms = "http://schemas.microsoft.com/cdo/configuration/" \t
mail.Configuration.Fields.Item(urlms & "sendusing") = 2 'enviar usando port
mail.Configuration.Fields.Item(urlms & "smtpserver") = "smtp.gmail.com"
mail.Configuration.Fields.Item(urlms & "smtpserverport") = 465
mail.Configuration.Fields.Item(urlms & "smtpusessl") = True
mail.Configuration.Fields.Item(urlms & "smtpconnectiontimeout") = 60
mail.Configuration.Fields.Item(urlms + "smtpauthenticate") = 1
mail.Configuration.Fields.Item(urlms + "sendusername") = "" 'login
mail.Configuration.Fields.Item(urlms + "sendpassword") = "" 'password
mail.Configuration.Fields.Update
mail.Send
我希望這不是你的**真實**證書,它會真的很愚蠢的發佈在像SO這樣的公共區域。 – Lankymart 2015-02-06 11:09:28
查看[Google - IMAP和POP3入門](https://support.google.com/mail/troubleshooter/1668960?hl=zh-CN#ts=1665119,1665162),您的設置是正確的。 – Lankymart 2015-02-06 11:14:36
不要擔心,我雖然我修復了它:P – Franchojavilondo 2015-02-10 11:19:41