Re: Weird date issue with emails
Scott Brown <[email protected]> Fri, 10 Oct 2003 09:28:06 -0700
| Newsgroups | gmane.comp.bug-tracking.anthill.user |
|---|---|
| Message-ID | <[email protected]> |
--===============67927900476905134==
Content-Type: multipart/alternative;
boundary="=====================_4595678==.ALT"
--=====================_4595678==.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed
Hi, Vincent,
I think this is Windows specific, here's the best I could find at php.net:
The Windows implementation of mail() differs in many ways from the Unix
implementation. First, it doesn't use a local binary for composing messages
but only operates on direct sockets which means a MTA is needed listening
on a network socket (which can either on the localhost or a remote
machine). Second, the custom headers like From:, Cc:, Bcc: and Date: are
not interpreted by the MTA in the first place, but are parsed by PHP. PHP <
4.3 only supported the Cc: header element (and was case-sensitive). PHP >=
4.3 supports all the mentioned header elements and is no longer
case-sensitive.
This harkens back to the problem I had with CC: vs. Cc:. I am at PHP 4.2.2.
I am not really a PHP programmer, although I am catching on. I have been
trying to add "Date: " date("r") to the routine d_DoDiff to see if that
fixes it, but I am not having much luck. Since "r" will spit out an RFC 822
compliant date, I thought that would be the thing to do, but I am just
breaking it when I try. I wanted to see if it then properly picked up the
-0700 GMT. But... Based on the statement above
I am not sure if that header element is supported properly in PHP 4.2.2 for
Windows. What interests me most, is to find out if others with Windows
installs are having the same issues with the GMT offset.
Oddly, ArgoSoft Mail Server Pro (the one I am using) was recommended by
one of the PHP users for testing. So, methinks this has less to do with the
MTA and more to do with PHP itself. I'll nose around to see if I can get
away with a 4.3 or higher PHP upgrade.
I'll see if I can puzzle it out.
PS - Are we the only ones on the list so far? Seems quiet here...
Thanks!
--Scott
At 08:35 PM 10/9/2003, you wrote:
>On Thu Oct 09, 2003 at 06:01:05PM -0700, Scott Brown wrote:
>
> > I've been looking over the PHP site for some troubles with mail and
> > Windows, haven't really found anything off-hand that will help this.
> >
> > E-mails sent from Anthill don't seem to respect Daylight vs. Standard
> time.
> > E-mails that come from Anthill think that the local time is -0800 GMT, but
> > we are currently at -0700 GMT, so the email comes into the in box
> appearing
> > to have been sent one hour later (since it thinks the senders time zone is
> > -0800, but it is actually -0700, when in reality they are the exact same
> > time, and I sort by local time).
> >
> > I noted at PHP.net, some users recommend setting the date in the header; I
> > don't know if this would fix it or not.
> >
> > Anybody have any clues?
>
>What happens if you write a quick script to run mail with a test message
>(outside of anthill)? Does the same date problem persist (ie. maybe it's a
>problem with the MTA or perhaps apache)?
>
>Anthill doesn't really do anything interesting with the date other than
>formatting it.. I don't try to figure out timezones or anything like that...
>so it's using whatever php is using which is the date/time of the host
>machine IIRC.
>
>I don't know if I want to start monkeying with that kind of thing, although
>it does look like I may have to do some other messing with the mail() calls
>to properly handle multi-lingual charsets.
>
>--
>MandrakeSoft Security; http://www.mandrakesecure.net/
>Online Security Resource Book; http://linsec.ca/
>"lynx -source http://linsec.ca/vdanen.asc | gpg --import"
>{FE6F2AFD : 88D8 0D23 8D4B 3407 5BD7 66F9 2043 D0E5 FE6F 2AFD}
>
>
>_______________________________________________
>Anthill-users mailing list
>Anthill-users-+mQDA36h6dWw5LPnMra/[email protected]
>http://vmlinuz.ca/mailman/listinfo/anthill-users
--=====================_4595678==.ALT
Content-Type: text/html; charset="us-ascii"
<html>
<body>
Hi, Vincent,<br><br>
I think this is Windows specific, here's the best I could find at
php.net:<br><br>
<br>
The Windows implementation of <b>mail()</b> differs in many ways from the
Unix implementation. First, it doesn't use a local binary for composing
messages but only operates on direct sockets which means a <tt>MTA</tt>
is needed listening on a network socket (which can either on the
localhost or a remote machine). Second, the custom headers like
<tt>From:</tt>, <tt>Cc:</tt>, <tt>Bcc:</tt> and <tt>Date:</tt> are
<b>not</b> interpreted by the <tt>MTA</tt> in the first place, but are
parsed by <tt>PHP</tt>. <tt>PHP</tt> < 4.3 only supported the
<tt>Cc:</tt> header element (and was case-sensitive). <tt>PHP</tt> >=
4.3 supports all the mentioned header elements and is no longer
case-sensitive. <br><br>
This harkens back to the problem I had with CC: vs. Cc:. I am at PHP
4.2.2.<br><br>
I am not really a PHP programmer, although I am catching on. I have been
trying to add "Date: " date("r") to the routine
d_DoDiff to see if that fixes it, but I am not having much luck. Since
"r" will spit out an RFC 822 compliant date, I thought that
would be the thing to do, but I am just breaking it when I try. I wanted
to see if it then properly picked up the -0700 GMT. But... Based on the
statement above<br>
I am not sure if that header element is supported properly in PHP 4.2.2
for Windows. What interests me most, is to find out if others with
Windows installs are having the same issues with the GMT
offset.<br><br>
Oddly, ArgoSoft Mail Server Pro (the one I am using) was
recommended by one of the PHP users for testing. So, methinks this has
less to do with the MTA and more to do with PHP itself. I'll nose around
to see if I can get away with a 4.3 or higher PHP upgrade.<br><br>
I'll see if I can puzzle it out.<br><br>
PS - Are we the only ones on the list so far? Seems quiet
here...<br><br>
Thanks!<br>
--Scott<br><br>
<br><br>
<br><br>
At 08:35 PM 10/9/2003, you wrote:<br>
<blockquote type=cite class=cite cite>On Thu Oct 09, 2003 at 06:01:05PM
-0700, Scott Brown wrote:<br><br>
> I've been looking over the PHP site for some troubles with mail and
<br>
> Windows, haven't really found anything off-hand that will help
this.<br>
> <br>
> E-mails sent from Anthill don't seem to respect Daylight vs.
Standard time. <br>
> E-mails that come from Anthill think that the local time is -0800
GMT, but <br>
> we are currently at -0700 GMT, so the email comes into the in box
appearing <br>
> to have been sent one hour later (since it thinks the senders time
zone is <br>
> -0800, but it is actually -0700, when in reality they are the exact
same <br>
> time, and I sort by local time).<br>
> <br>
> I noted at PHP.net, some users recommend setting the date in the
header; I <br>
> don't know if this would fix it or not.<br>
> <br>
> Anybody have any clues?<br><br>
What happens if you write a quick script to run mail with a test
message<br>
(outside of anthill)? Does the same date problem persist (ie. maybe
it's a<br>
problem with the MTA or perhaps apache)?<br><br>
Anthill doesn't really do anything interesting with the date other
than<br>
formatting it.. I don't try to figure out timezones or anything like
that...<br>
so it's using whatever php is using which is the date/time of the
host<br>
machine IIRC.<br><br>
I don't know if I want to start monkeying with that kind of thing,
although<br>
it does look like I may have to do some other messing with the mail()
calls<br>
to properly handle multi-lingual charsets.<br><br>
-- <br>
MandrakeSoft Security;
<a href="http://www.mandrakesecure.net/" eudora="autourl">http://www.mandrakesecure.net/</a><br>
Online Security Resource Book;
<a href="http://linsec.ca/" eudora="autourl">http://linsec.ca/</a><br>
"lynx -source
<a href="http://linsec.ca/vdanen.asc" eudora="autourl">http://linsec.ca/vdanen.asc</a>
| gpg --import"<br>
{FE6F2AFD : 88D8 0D23 8D4B 3407 5BD7 66F9 2043 D0E5 FE6F 2AFD}<br><br>
<br>
_______________________________________________<br>
Anthill-users mailing list<br>
Anthill-users-+mQDA36h6dWw5LPnMra/[email protected]<br>
<a href="http://vmlinuz.ca/mailman/listinfo/anthill-users" eudora="autourl">http://vmlinuz.ca/mailman/listinfo/anthill-users</a></blockquote></body>
</html>
--=====================_4595678==.ALT--
--===============67927900476905134==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Anthill-users mailing list
Anthill-users-+mQDA36h6dWw5LPnMra/[email protected]
http://vmlinuz.ca/mailman/listinfo/anthill-users
--===============67927900476905134==--