How to send an email from a non-gmail account using the app

I have successfully sent an email using the Google App Engine. However, the only email address I can get is the gmail address, which I called the site administrator. I run the application in my own domain (purchased and supported using Google Apps). I would like to send an email from my domain. Here's the code (or something similar to it):

from google.appengine.api import mail sender = " myaddress@google.com " sender_i_want = " myaddress@mygoogleapp.com " mail.send_mail(sender=sender, to="Albert Johnson < Albert.Johnson@example.com >", subject="Your account has been approved", body=some_string_variable) 

And the error I get when I try to send it from my own domain is "InvalidSenderError: Unauthorized sender". I own a domain, I really allow my domain to be used for sending mail, I just need to know how to convince App Engine that this is true.

+4
source share
1 answer

This is the limitation of the App Engine mailbox API :

The sender address can be either the email address of the registered administrator for the application, or the email address of the current user with a subscription (the user sending the request, sending the message).

If you have Google Apps running on this domain, you must have (or be able to create) @ thatdomain.com email addresses that you can register as the administrator of the App Engine application in question, let me send you the address Email from this address.

+7
source

Source: https://habr.com/ru/post/1313911/


All Articles