class MyInboundMailHandler(InboundMailHandler):
def post(self):
try:
super(MyInboundMailHandler, self).post()
except Exception as ex:
logging.warning('Could not process message because %s.', ex)
# save the request body or whatever
def receive(self, mail_message):
# Process message
我不认为有一种方法可以将它与收件箱联系起来,但是你可以先将邮件发送到收件箱,然后自动转发到appspotmail。你知道吗
或者,您可以重写默认邮件处理程序的
post
方法,以记录不可处理的电子邮件详细信息(或对其进行pickle处理并写入数据存储以供以后检查,或执行任何其他合适的操作:导入日志记录 从谷歌.appengine.ext.webapp.mail\u处理程序导入InboundMailHandler
(基于this answer的代码)
相关问题 更多 >
编程相关推荐