I want to check a large number of email addresses using Python. I was wondering what would be the best way to do this. I looked at SMTP and Validate Email , but I could not get either work.
For the SMTP library, I couldn’t figure out how to set up the SMTP server (I tried using Gmail, but it didn’t work), but for Validate Email it gave me “None” to ANY ANY address I tried.
Check email library code:
from validate_email import validate_email
is_valid = validate_email(EMAIL ADDRESS,verify=True)
I always returned "None" from the above code.
SMPT library code:
import smtplib
server = smtplib.SMTP()
server.connect()
When I used server = smtplib.SMTP('smtp.gmail.com',587), I got:
(252, "2.1.5 Send some mail, I'll try my best or1sm11343445igb.4 - gsmtp")
No matter what email address I put in server.verify(email).
1: , !