1

I've found a number of tutorials online involving downloading messages via Poplib, but haven't been able to find anything explaining how to create new messages. Does this exist?

2 Answers2

3

As S.Lott rightly says, you will want some smtp, but to create the actual email, use the email package from the standard library, then use an message's as_string method to send it.

An example with multipart MIME (how cool is that!)

Ali Afshar
  • 40,967
  • 12
  • 95
  • 109
2

Send yourself an email to create a message.

SMTP is the protocol the email uses to send. In Python, you'd find this in smtplib.

There are numerous email RFC's. Here are a few.

SMTP - RFC 821

POP - RFC 1939

IMAP - RFC 1730

S.Lott
  • 384,516
  • 81
  • 508
  • 779