SMTP
Richard van de Stadt
stadt at cs.utwente.nl
Sun Aug 19 16:11:16 EDT 2001
Peter Hansen wrote:
>
> Sophie Coon wrote:
> >
> > That is how I do it :
> > subject = "My subject"
> > body = "My message"
> > msg = "Subject:"+subject+"\n"+body
> > server = smtplib.SMTP('localhost')
> > server.sendmail(fromaddress, toaddress, msg)
> > server.quit()
>
> You likely need an additional "\n" between the last
> header line and the first line of the body.
>
> --
> ----------------------
> Peter Hansen, P.Eng.
> peter at engcorp.com
This works for most systems, but not for e.g.
bells.cs.ucl.ac.uk
-----
> From: MAILER-DAEMON at xxxxxxxxxx
>
> Hi. This is the qmail-send program at xxxxxxxxx
> I'm afraid I wasn't able to deliver your message to the following addresses.
> This is a permanent error; I've given up. Sorry it didn't work out.
>
> bells.cs.ucl.ac.uk failed after I sent the message.
> Remote host said: 554 No date field given
Richard.
More information about the Python-list
mailing list