我有麻烦了。我现在玩很长时间了,在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
提交
取消