How can my appengine app send mail using the sende

2019-07-29 19:37发布

Say I have an appengine app called foo at foo.appspot.com and my email i.e. adminfoo(at)gmail.com is it's adminstrator.

Now, I want to sell this service to blah.com. blah.com has a google app account and 'adds' the foo application and sets the url http://foo.blah.com to point to it.

Now, using the new namespace manager, I carve out separate data for blah.com but when blah.com wants to send out email currently the only way it is possible is either

  • sender is admin i.e. adminfoo (at) gmail.com
  • or foo.appspot.com has to add someone(@)blah.com as a developer

Is there any other way? What happens if one has 1,000's of customers ?

Also, the docs state that the email sender can be 'the currently logged in user'. So, if someone(at)blah.com were to 'login' using the google login and 'stay logged in to the app' than can the app send email on behalf of someone(at)blah.com with someone(at)blah.com being the sender?

2条回答
我命由我不由天
2楼-- · 2019-07-29 19:52

You might want to look into an 3rd party E-Mail provider. We use http://postmarkapp.com/ for our AppEngine projets (via huTools.postmark) and we love it.

查看更多
够拽才男人
3楼-- · 2019-07-29 19:55

The other way is that your app can send email as anything@appid.appspotmail.com, where 'appid' is its App ID. As you say, you can also send email as the logged in user - but only on requests made by that user - so sending mail as them from the Task Queue is out.

查看更多
登录 后发表回答