我有麻煩了。我現在玩很長時間了,在google應用中收到電子郵件,但是在我的應用中,日志僅顯示以下內容:0.1.0.20 - - [13/Jun/2013:08:42:23 -0700] "POST /_ah/mail/contact@myappid.appspotmail.com HTTP/1.1" 200 0 - - "myappid.appspot.com" ms=69 cpu_ms=0 cpm_usd=0.100008 app_engine_release=1.8.1 instance=00c61b117c2fb913155f167711d12979c818fd我的郵件處理程序腳本應為:mailmain.pyimport loggingimport webapp2from google.appengine.ext.webapp.mail_handlers import InboundMailHandlerfrom google.appengine.api import mail class LogSenderHandler(InboundMailHandler): def receive(self, mail_message): tobesent = mail_message.subject logging.info("From: " + mail_message.sender) logging.info("To:" + mail_message.to) logging.info("Subject: " + mail_message.subject) logging.info("Date: " + mail_message.date)app = webapp2.WSGIApplication([LogSenderHandler.mapping()], debug=True)而我的app.yaml是這樣的:application: myappidversion: 1runtime: python27api_version: 1threadsafe: nohandlers:- url: /favicon\.ico static_files: favicon.ico upload: favicon\.ico- url: /_ah/mail/contact@myappid.appsportmail.com script: mailmain.py login: admin- url: /.* script: mailmain.pyinbound_services:- mail我嘗試過使用該腳本,所以我有很多版本,某些版本以此結尾(如果這很重要),但實際上沒有任何效果:def main(): app = webapp2.WSGIApplication([LogSenderHandler.mapping()], debug=True) run_wsgi_app(application)if __name__ == "__main__": main()我也上傳了一個favicon.ico。Google錯誤數小時之久,無濟于事。在這里,我在Stackoverflow上找到了類似的錯誤消息解決方案,例如correct recieveinto,receive但是這里不是這種情況。我也復制了其他解決方案,也從GITHUB復制了此解決方案,因此我相信這個問題不是重復的。
添加回答
舉報
0/150
提交
取消