开发者

is the sender of google-app-engine allow my own gmail

my gmail is zjm1126@gmail.com

i can only use zjm1126@gmail.com in the sender=".." ,yes ??

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.开发者_如何学Go

    The example.com Team
    """

    message.send()

thanks


There are two kinds of FROM addresses allowed by GAE's e-mail API:

  • The currently authenticated Google user of your app (if your app uses Google auth and someone's logged in)
  • The Google address of any administrator of the app engine app (e.g. you, as the owner)

"If you want to send email on behalf of the application but do not want to use a single administrator's personal Google Account as the sender, you can create a new Google Account for the application using any valid email address, then add the new account as an administrator for the application. To add an account as an administrator, see the "Developers" section of the Admin Console."

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜