SMTP

Richard van de Stadt stadt at cs.utwente.nl
Sun Aug 19 19:08:18 EDT 2001


Markus Schaber wrote:
> 
> Hi,
> 
> Richard van de Stadt <stadt at cs.utwente.nl> schrub:
> 
> > -----
> >> 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.
> 
> You have to append an appropriate Date: Header.
> 
> See the Mail RFCs which headers have to be there, and which one can
> leave out.

'Have to' doesn't apply to most mail systems. I've been running a
system that collects submissions for conferences, which has been sending
out feedback messages to many addresses using smtplib ever since it was
introduced in 1.5.2, and this is the first time I meet a mail system
that bouces because it wants a 'Date:' in the header.

Anyway, I plan to use this:

from time import time, ctime, tzname, daylight
date = 'Date: ' + ctime(time()) + ' ' + tzname[daylight] + '\n'

and put date between the 'Subject:' and the 'From:' lines

Richard.



More information about the Python-list mailing list