Send an email from your App Engine Instance
# Function to send email def trigger_email(msg): # Change these to your email details email_user = "user@user.com" email_password = "blahbhal" smtp_server = 'smtp-relay.gmail.com' smtp_port = 587 email_from = "sender@sender.com" email_to = "recx@recx.com" # login to the email server server = smtplib.SMTP(smtp_server, smtp_port) server.starttls() server.login(email_user, email_password) # send email server.sendmail(email_from, email_to, msg) server.quit()
Appendix G Suite SMTP relay service
Use the SMTP relay service to send mail from your organization by authenticating with IP addresses. You can send messages to anyone inside or outside of your organization. This option is the most secure.
Requirements
Sending limits |
A G Suite user can relay messages to up to 10,000 recipients per day. |
Anti-spam filters | Suspicious emails might be filtered or rejected. |
Fully qualified domain name of SMTP service | smtp-relay.gmail.com |
Configuration options |
|
Authentication requirements |
Static IP address or a valid G Suite user sign-in. |
Use the SMTP relay service to send mail from your organization by authenticating with IP addresses. You can send messages to anyone inside or outside of your organization. This option is the most secure.
Requirements
Sending limits |
A G Suite user can relay messages to up to 10,000 recipients per day. |
Anti-spam filters | Suspicious emails might be filtered or rejected. |
Fully qualified domain name of SMTP service | smtp-relay.gmail.com |
Configuration options |
|
Authentication requirements |
Static IP address or a valid G Suite user sign-in. |
Leave a Reply