Created
July 27, 2011 11:54
-
-
Save lxneng/1109205 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> import smtplib | |
>>> gmail_smtp='74.125.127.109' | |
>>> handle = smtplib.SMTP(gmail_smtp, 25) | |
>>> handle.ehlo() | |
(250, 'mx.google.com at your service, [58.246.22.38]\nSIZE 35882577\n8BITMIME\nS | |
TARTTLS\nENHANCEDSTATUSCODES') | |
>>> handle.starttls() | |
(220, '2.0.0 Ready to start TLS') | |
>>> handle.login('[email protected]', 'xxxxxxx') | |
(235, '2.7.0 Accepted') | |
>>> handle.sendmail('[email protected]', ['[email protected]'],'''From:lxneng@gmai | |
l.com\r\nTo:[email protected]\r\nSubject:Hello\r\nHahadkfjsflsdjflsd\r\n''') | |
{} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment