How can my appengine app send mail using the senderid of domain that installed the app

北战南征 提交于 2019-12-24 18:38:28

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/4066542/how-can-my-appengine-app-send-mail-using-the-senderid-of-domain-that-installed-t

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!