× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



If this is really what the code does, then the code is incorrect. That's not a legitimate way to set the date in an SMTP e-mail header. RFC 2822 (Section 3.3) is very specific about the format of a date-time, and it's not the same as the output of ctime().

However, my copy of SNDEMAIL works completely differently than that (not BETTER, mind you, just different)

I've written a lot of TCP/IP software, and SMTP is one of the areas that I've spent a lot of time working with. My complaint about SNDEMAIL has never been that it's "ancient", but rather that the author didn't know as much about SMTP and E-mail as he should've!


John McKee wrote:
We still use the ancient SNDEMAIL command. Just for simple error messages.

My issue is that when an email is received, the time in the email header lags by
six hours. I tried to fix it some time back, but the time is still wrong.

Here is how I am generating the date:

H BndDir( 'QC2LE' )
.
.
.
D time_t s 10i 0
D CurrentTime Pr 10i 0 ExtProc( 'time' )
D TimeToString Pr * ExtProc( 'ctime' )
D ElapTime 10i 0 value.
.
.
c* get time in seconds since Jan 1, 1970
c eval time_t = CurrentTime

C eval mdatetime =
C 'Date: ' + %str(TimeToString(time_t) )

When I look at the option on a received email (using Outlook), the time is
showing as this in the header: Wed, 5 Nov 2008 00:44:39 -0600

The Date entry in the header looks like this, as far as I can copy:

Wed Nov 5 00:44:37 2008…


But, Outlook shows the time as:

Tue 11/04/2008 18:45



Any ideas why the time is off by 6 hours? Am I not formatting the time
correctly?

John McKee



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.