【问题标题】:is the sender of google-app-engine allow my own gmail是 google-app-engine 的发件人允许我自己的 gmail
【发布时间】:2010-04-24 19:19:29
【问题描述】:

我的 gmail 是 zjm1126@gmail.com

我只能在发件人=“..”中使用zjm1126@gmail.com,是吗??

from google.appengine.api import mail

    message = mail.EmailMessage(sender="hahahaha@gmail.com",
                                subject="Your account has been approved")

    message.to = "zjm1126@qq.com"
    message.body = """
    Dear Albert:

    Your example.com account has been approved.  You can now visit
    http://www.example.com/ and sign in using your Google Account to
    access new features.

    Please let us know if you have any questions.

    The example.com Team
    """

    message.send()

谢谢

【问题讨论】:

    标签: python google-app-engine email


    【解决方案1】:

    GAE 的电子邮件 API 允许两种 FROM 地址:

    • 您的应用当前经过身份验证的 Google 用户(如果您的应用使用 Google 身份验证并且有人登录)
    • 应用引擎应用的任何管理员(例如您,作为所有者)的 Google 地址

    “如果您想代表应用程序发送电子邮件但不想使用单个管理员的个人 Google 帐户作为发件人,您可以使用任何有效的电子邮件地址为应用程序创建一个新的 Google 帐户,然后添加作为应用程序管理员的新帐户。要将帐户添加为管理员,请参阅管理控制台的“开发人员”部分。”

    http://code.google.com/appengine/docs/java/mail/overview.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-09-25
      • 2022-06-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多