Gmail – Limitations on Sending Email Through SMTP

gmailsmtp

I'm debugging a web application that is attempting to send email through Gmail and I'm getting rejections.

It works for a while after logging in through the browser, then starts to fail again.

What I get when I try to send email is:

$ openssl s_client -starttls smtp -connect smtp.gmail.com:587
CONNECTED(00000003)
(gmail's SSL certificate information)
250 ENHANCEDSTATUSCODES
ehlo example.com
250-mx.google.com at your service, [184.169.174.60]
250-SIZE 35882577
250-8BITMIME
250-AUTH LOGIN PLAIN XOAUTH XOAUTH2
250 ENHANCEDSTATUSCODES
auth plain bm9ib2R5QGV4YW1wbGUuY29tAG5vYm9keUBleGFtcGxlLmNvbQBIYWhhIHRoaW5rIGFnYWluCg==
534-5.7.9 Please log in with your web browser and then try again. Learn more at
534-5.7.9 https://support.google.com/mail/bin/answer.py?answer=78754
534 5.7.9 {WEBLOGINREQUIRED} ag4sm30811879pbc.20 - gsmtp

Is there any way around this? Yes, I know the right answer is to use another service or send the mails myself, but I want to know what lockout I'm triggering.

I don't seem to be running into a rate limitation as I'm not getting the “rate limited” error (550 5.4.5 Daily sending quota exceeded.)

Best Answer

Use an email sending service that's designed for sending out large numbers of notifications (such as Mandrill).

Don't use Gmail to send out lots of email - they view such traffic as suspect and will mark your account as requiring manual verification when they see such traffic.

Related Topic