views:

245

answers:

2

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  A: 

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
+3  A: 

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 A