Mainpulating the "sent time"

19 views
Skip to first unread message

stephan.willmeroth

unread,
Oct 20, 2010, 3:20:17 AM10/20/10
to Perl Mail::Sendmail
Hi,

at work we are using Sendmail to send mails (surprise!) to a majordomo
list after running an automated nightly GUI-testrun.
This run is started at 10pm and runs until at least 2am. The results
are processed, formatted and then sent.
The problem: The time shown is (of course) the day the run ended, what
results in some problems in our internal reports.

So, is there a way to manipulate the time in the mail header to set it
to the time our run was started?

Thanking you in anticipation!

mi...@alma.ch

unread,
Oct 20, 2010, 5:13:23 AM10/20/10
to perl-mai...@googlegroups.com

I'm not sure I understand your problem, but you can add your own custom
Date: header to the mail. For example:

$mail{Date} = 'Tue, 19 Oct 2010 21:09:56 +0200';

To make the date string, you can use the module's time_to_date()
function. So you could also write:

$mail{Date} = Mail::Sendmail::time_to_date( $my_unix_epoch_time );

Stephan Willmeroth

unread,
Oct 20, 2010, 7:45:08 AM10/20/10
to perl-mai...@googlegroups.com
Thanks, that's exactly what I was looking for!

--
You received this message because you are subscribed to the Google Groups "Perl Mail::Sendmail" group.
To post to this group, send email to perl-mai...@googlegroups.com.
To unsubscribe from this group, send email to perl-mailsendm...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/perl-mailsendmail?hl=en.


Reply all
Reply to author
Forward
0 new messages