| LEFT | RIGHT |
| 1 :mod:`smtplib` --- SMTP protocol client | 1 :mod:`smtplib` --- SMTP protocol client |
| 2 ======================================= | 2 ======================================= |
| 3 | 3 |
| 4 .. module:: smtplib | 4 .. module:: smtplib |
| 5 :synopsis: SMTP protocol client (requires sockets). | 5 :synopsis: SMTP protocol client (requires sockets). |
| 6 .. sectionauthor:: Eric S. Raymond <esr@snark.thyrsus.com> | 6 .. sectionauthor:: Eric S. Raymond <esr@snark.thyrsus.com> |
| 7 | 7 |
| 8 | 8 |
| 9 .. index:: | 9 .. index:: |
| 10 pair: SMTP; protocol | 10 pair: SMTP; protocol |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 server = smtplib.SMTP('localhost') | 395 server = smtplib.SMTP('localhost') |
| 396 server.set_debuglevel(1) | 396 server.set_debuglevel(1) |
| 397 server.sendmail(fromaddr, toaddrs, msg) | 397 server.sendmail(fromaddr, toaddrs, msg) |
| 398 server.quit() | 398 server.quit() |
| 399 | 399 |
| 400 .. note:: | 400 .. note:: |
| 401 | 401 |
| 402 In general, you will want to use the :mod:`email` package's features to | 402 In general, you will want to use the :mod:`email` package's features to |
| 403 construct an email message, which you can then send | 403 construct an email message, which you can then send |
| 404 via :meth:`~smtplib.SMTP.send_message`; see :ref:`email-examples`. | 404 via :meth:`~smtplib.SMTP.send_message`; see :ref:`email-examples`. |
| LEFT | RIGHT |