Python Gae应用程序部署后不发送电子邮件
我有这个发送电子邮件的代码。 它与localhost配合得很好,在日志中我可以确认 电子邮件已发送 一旦我上传了应用程序,电子邮件就不再发送了Python Gae应用程序部署后不发送电子邮件,python,google-app-engine,Python,Google App Engine,我有这个发送电子邮件的代码。 它与localhost配合得很好,在日志中我可以确认 电子邮件已发送 一旦我上传了应用程序,电子邮件就不再发送了 message = mail.EmailMessage(sender="ISP leave request <noreply@xxxAPP-IDxx.appspotmail.com>", subject="NEW LEAVE REQUEST - REQUIRES ADMIN APPROVAL") message.to =
message = mail.EmailMessage(sender="ISP leave request <noreply@xxxAPP-IDxx.appspotmail.com>",
subject="NEW LEAVE REQUEST - REQUIRES ADMIN APPROVAL")
message.to = 'xxxxxxxxx@gmail.com'
message.body = """ YYYYY,
The below employee has requested for a leave.
Name: %s %s
leavetype: %s
Days.: %s
From : %s
To : %s
Reason: %s
Please reply.
""" % (thisuser.firstname,
thisuser.lastname,
leavetype,
days,
datefrom,
dateto,reason)
message.send()
message=mail.EmailMessage(sender=“ISP请假请求”,
主题=“新请假申请-需要管理员批准”)
message.to=xxxxxxxxx@gmail.com'
message.body=“”YYYY,
以下员工已申请休假。
名称:%s%s
类型:%s
天数::%s
发件人:%s
发送至:%s
原因:%s
请回复。
“%”(thisuser.firstname,
thisuser.lastname,
叶型,
天,
日期:,
日期、原因)
message.send()
请协助很可能发件人的电子邮件不正确。根据规定,必须是以下各项之一:
您的应用程序引擎日志中有什么内容?@AbuAshrafMasnun'使用带有--enable_sendmail INFO 2015-12-16 12:47:09921 mail_stub.py:143]MailService的服务器。发送发件人:ISP请假批准至:xxxxxxx@gmail.com主题:请假申请审批-状态正文:内容类型:文本/普通数据长度:361'这是日志的来源吗生产?它是我在localhostCheck生产日志上运行应用程序时的日志。您的问题在生产上,来自localhost的日志没有多大帮助。@Lips来自的电子邮件anything@appname.appspotmail.comgor to my spam box我不知道为什么,因为很可能有几个人滥用了它,所以它会自动标记为垃圾邮件。。只要授权一封更私人的电子邮件,你就没事了。。也可以将其标记为非垃圾邮件:)谢谢@Lipis le me这样做