swede has asked for the wisdom of the Perl Monks concerning the following question:

Recently, I have been making great use of the Mail::Sender module and noticed some issues with the dates that the emails end up displaying... It appears that when sending attachments, the date header of the email can get set way off from date on the machine it is sending from as well as the smtp server it is sending to. I have seen the date showing anywhere from 24-36 hours behind the actual time the email is sent. I have not seen this occur just for plain text emails. The work-around I came up with was to just create a date string and set the 'Date:' header when sending the email; it works, but the whole deal doesn't seem quite right. I was wondering if anyone else has experienced this and/or might know of how to correct it. I'm using version 0.7.10, the latest release. Thanx in advance!

Replies are listed 'Best First'.
Re: Date header with Mail::Sender
by davorg (Chancellor) on Sep 28, 2001 at 12:09 UTC

    The "Date:" header is set by your MTA (probably sendmail) not by Mail::Sender. The problem is probably with the configuration of that.

    --
    <http://www.dave.org.uk>

    "The first rule of Perl club is you don't talk about Perl club."

      No longer true. I was notified that some MTAs do not add the header at all so newer versions (please do NOT use anything between 0.7.10 and 0.7.13.1, there was a stupid bug!) add that header themselves. Unless you turn it off with $Mail::Sender::NO_DATE = 1
      == Jenda@Krynicky.cz == http://Jenda.Krynicky.cz ==
      Always code as if the guy who ends up maintaining your code
      will be a violent psychopath who knows where you live.
            -- Rick Osborne, <osborne@gateway.grumman.com>