I would expect that the mail client should be able to cope with a correctly formatted timestamp, whatever it is configured (UTC or CST). so I would not waste time with it.
I've never used it, but in my understanding Net::SMTP is a bit too low-level to have an explicit handling of the timestamp. From one of the examples
#!/usr/local/bin/perl -w
use Net::SMTP;
$smtp = Net::SMTP->new('mailhost');
$smtp->mail($ENV{USER});
$smtp->to('postmaster');
$smtp->data();
$smtp->datasend("To: postmaster\n");
$smtp->datasend("\n");
$smtp->datasend("A simple test message\n");
$smtp->dataend();
$smtp->quit;
I see that you basically have to datasend() both headers and body, so why don't you put the timestamp using a Date: header? Something like:
#!/usr/local/bin/perl -w
use Net::SMTP;
$smtp = Net::SMTP->new('mailhost');
$smtp->mail($ENV{USER});
$smtp->to('postmaster');
$smtp->data();
$smtp->datasend("To: postmaster\n");
$smtp->datasend("Date: Mon, 5 Jul 2004 11:35:36 +0200 (MEST)\n");
$smtp->datasend("\n");
$smtp->datasend("A simple test message\n");
$smtp->dataend();
$smtp->quit;
OTOH, if you're not telling the whole story and you're using some other module to build up your e-mail, like something in the MIME namespace, you probably have to look there for a way of setting the message date.
Flavio (perl -e 'print(scalar(reverse("\nti.xittelop\@oivalf")))')
Don't fool yourself.
|