[問題] 用ASP使GMAIL大量發信

看板Web_Design作者 (Xcthony)時間15年前 (2010/04/14 14:45), 編輯推噓1(104)
留言5則, 3人參與, 最新討論串1/1
小弟寫了這樣的程式,想要裡用GMAIL來大量發信 但是信沒有寄出去,也不知道發生了什麼事情 請高手幫忙解答一下 以下為程式碼: strDSN = "Driver={Microsoft Excel Driver (*.xls)};"&_ "DBQ="& Server.MapPath("XXXXXXX_email.xls") strSQL = "SELECT * FROM [email$]" Set strConn = Server.CreateObject("ADODB.Connection") strConn.Open strDSN Set Rs = Server.CreateObject("ADODB.RecordSet") Rs.Open strSQL , strConn , 1 , 3 Set myMail = CreateObject("CDO.Message") Do myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com" myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465 myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = true myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "user" myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password" myMail.Configuration.Fields.Update myMail.Subject = "主旨" myMail.From = "寄件人" myMail.To = Rs("email") myMail.HTMLbody = "內容" myMail.Send Loop Until Rs.EOF 結果沒有半個人收到,然後我去信箱那收到這樣的信 Technical details of permanent failure: Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 550 550-5.1.1 The email account that you tried to reach does not exist. Please try 550-5.1.1 double-checking the recipient's email address for typos or 550-5.1.1 unnecessary spaces. Learn more at 550 5.1.1 http://mail.google.com/support/bin/answer.py?answer=6596 9si13917025bwz.0 (state 14). ----- Original message ----- Received: by 10.204.74.77 with SMTP id t13mr6990698bkj.7.1271191028883; Tue, 13 Apr 2010 13:37:08 -0700 (PDT) Return-Path: <XXXXXX@gmail.com> Received: from XXXXXPC (2XX-XX-XX-252.adsl.dynamic.seed.net.tw [2XX.XX.XX.252]) by mx.google.com with ESMTPS id 16sm2639851bwz.5.2010.04.13.13.37.05 (version=SSLv3 cipher=RC4-MD5); Tue, 13 Apr 2010 13:37:07 -0700 (PDT) Thread-Topic: =?big5?B?sXqmbiGzb7jMrE+w6qXfu0+rbqRqvsen967GrOy+x6h0qHS+x7d8oUGms6VIpFU=?= =?big5?B?qMal87Sjv/SxeqFHvseq+Klqpl6uUa5hqrqw3aj3?= thread-index: AcrbSQ7C/If6t4IlTFSYhaQ5+xhKnA== From: =?big5?B?sOql37tPq26kar7Hp/euxqzsvseodKh0vse3fLZspfOodLLO?= <XXXX@gmail.com> To: <XXXXXX@gmail.com> Subject: =?big5?B?sXqmbiGzb7jMrE+w6qXfu0+rbqRqvsen967GrOy+x6h0qHS+x7d8oUGms6VIpFU=?= =?big5?B?qMal87Sjv/SxeqFHvseq+Klqpl6uUa5hqrqw3aj3?= Date: Wed, 14 Apr 2010 04:37:06 +0800 Message-ID: <9AFF90A9C5B7458185298D10003BBCF4@XcthonyPC> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0028_01CADB8C.1CE64D80" X-Mailer: Microsoft CDO for Windows 2000 Content-Class: urn:content-classes:message Importance: normal Priority: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.1.7600.16385 大致上就是這樣吧= = 因為涉及隱私所以我把所有的EMAIL都換掉了....若有沒換掉的.... 呵呵~大家就不要追下去了~~謝謝啦..... 希望有人可以解答,謝謝 ^.< -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 211.74.82.252

04/14 14:57, , 1F
The email account that you tried to reach does not
04/14 14:57, 1F

04/14 14:57, , 2F
exist. 答案你自己都已經說出來了
04/14 14:57, 2F

04/14 14:58, , 3F
學會看錯誤訊息是寫程式的基本功夫...
04/14 14:58, 3F

04/14 15:04, , 4F
另外gmail smtp 有每日500封的上限
04/14 15:04, 4F

04/15 01:02, , 5F
喔喔!謝謝我是一個新手還在自己摸索當中,不過謝謝指教:)
04/15 01:02, 5F
文章代碼(AID): #1BnMIZBX (Web_Design)