send email on Google App Engine from custom domain

2019-05-31 18:15发布

What I have done:

  1. I have added my domain app.mydomain.com to my app engine project, and can successfully visit id.appspot.com using app.mydomain.com.
  2. I have registered mydomain.com on google app for business.

The problem:

The problem is -- I am NOT able to send emails using @mydomain.com address. If I register an info@mydomain.com as an developer, this will probably solve the problem, but we need to send from more than one address, and I don't think registering a new developer for each address is reasonable.

Anybody knows how to solve this? Thanks!

4条回答
Summer. ? 凉城
2楼-- · 2019-05-31 18:42

According to the docs, the sender would need to be an administrator on the project (called "owner" in the new Developers Console). Another route would be to just use a separate email sending service like SendGrid or Postmark.

查看更多
做个烂人
3楼-- · 2019-05-31 18:45

You have two options:

  1. Register all emails that you want to use as administrators/developers but as you mentioned in your post you don't want to do that.

  2. Use SendGrid (or any other email services like Mandrill, Mailgun, etc.) which will give you a lot more features comparing to what GAE offers, including 25k free emails instead of GAE's 100.

查看更多
对你真心纯属浪费
4楼-- · 2019-05-31 18:54

You shouldn't have any problem adding and verifying your domain, adding the necessary permissions to send emails. Then, every email address in your domain can be used. See here in the docs: https://developers.google.com/appengine/docs/java/mail/#Java_Sending_mail

查看更多
Anthone
5楼-- · 2019-05-31 19:03

You can use the GMail API to send emails as users of your domain. Note that the emails need to be aliases, groups or users of your domain.

查看更多
登录 后发表回答