2010-04-24 44 views
0

我的Gmail是[email protected]是谷歌 - 应用程序引擎的发件人允许我自己的Gmail

我只能在发件人使用[email protected] =“..”,是的?

from google.appengine.api import mail 

    message = mail.EmailMessage(sender="[email protected]", 
           subject="Your account has been approved") 

    message.to = "[email protected]" 
    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() 

感谢

回答

3

有两种从地址通过GAE的电子邮件API允许:

  • 您的应用程序的当前已验证谷歌用户(如果您的应用程序使用谷歌权威性和别人的登录)
  • 应用程序引擎应用程序的任何管理员的Google地址(例如您作为所有者)

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

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