send email

Riccardo Attilio Galli riquito at riquito.matrix
Thu Sep 25 09:51:05 EDT 2003


On Thu, 25 Sep 2003 11:46:16 +0100, Peter Nuttall wrote:

> here is a program to send emails with python. It was writien quickly so it is 
> not perfect. 
> [SNIP]
> 
> if anyone has any comments I would like to see them.
> 
> Peter

peter, your program write 'e-mail' absolutely not rfc2822 compliant.
read 
http://www.faqs.org/rfcs/rfc2822.html
to know how should be a real e-mail message

This is an example of how the simplest e-mail should look like:

======================================
From: John Doe <jdoe at machine.example>
To: Mary Smith <mary at example.net>
Subject: Saying Hello
Date: Fri, 21 Nov 1997 09:55:06 -0600
Message-ID: <1234 at local.machine.example>

This is a message just to say hello.
So, "Hello".
======================================

remembering that every line MUST end whit "\r\n"

Please try to make your program sending correct e-mail, because it's hard
to develop parser which understand e-mail written in non standard format.

Ciao,
Riccardo

-- 
-=Riccardo Galli=-

 _,e.
s~  ``
 ~@.   ideralis Programs
.   ol 
 `**~  http://www.sideralis.net




More information about the Python-list mailing list