Difference between revisions of "Python/Smtplib"
From ProgrammingExamples
< Python
(→SmtpLibrary.py) |
|||
Line 3: | Line 3: | ||
---- | ---- | ||
<source lang="python"> | <source lang="python"> | ||
+ | |||
import smtplib | import smtplib | ||
Line 14: | Line 15: | ||
s.quit() | s.quit() | ||
</source><br> | </source><br> | ||
− | |||
---- | ---- | ||
[[Python|<font size='-2'>''back to Python examples''</font>]] | [[Python|<font size='-2'>''back to Python examples''</font>]] |
Revision as of 09:26, 27 June 2010
SmtpLibrary.py
import smtplib s = smtplib.SMTP('smtp.gmail.com', 587) s.starttls() s.login("example@gmail.com", "password12345") s.sendmail("example@gmail.com", "recipient@address.com", "Hello, this is the message") s.quit()