How we can send mail with attachment in Python?

dieter dieter at handshake.de
Mon Jul 20 03:10:05 EDT 2015


Kevin Peterson <qh.resu01 at gmail.com> writes:

> How we can send mail with attachment in Python? Is it any prerequisite for it?

You look at the "email" package to build the message
and the "smtplib" package to send the message -
both are part of Python's runtime library and documented in its
documentation.

Note that you need access to an "smtp" server (aka "mail server").
It ensures in cooperation with other "smtp" servers the distribution
of your email around the world. Access to an "smtp" server is a non-Python
issue.




More information about the Python-list mailing list