python - Gmail SMTP + XOAuth mystery -
I am using Python smtplib and xoauth and I am trying to send an email. I am using the code posted by Google:
I'm actually verifying against Gmail and I get this answer.
Answers: '235 2.7.0 Accepted \ r \ n '
After sending my XOAuth string as expected ()
When I receive an email I think I have the following error
Attempts to send a composition Answer: '530-5.5.1 Learn more at the authentication required answers:' 530 5.5.1 http://mail.google.com/support/bin/answer.py?topic=125 = 14257f10sm4144741bkl.17 \ r \ n '
? Any clue
The problem here is how you make a piece from SMTP connection my code:
smtp_conn = smtplib.SMTP ('smtp.googlemail.com', 587) # smtp_conn.set_debuglevel (true) smtp_conn.ehlo () smtp_conn.starttls () smtp_conn.ehlo () smtp_conn. DoCmd ('Pradhi', 'XOAUTH' + base64.b64encode (xoauth_string))
You create xoauth_string as an example from Google. After this you can use smtp_conn to send your email. If you have any problem then let me know you can get some sample code at
Comments
Post a Comment