smtpmail.p problem

hahsia17

New Member
Hi,

I am currently troubleshooting a smtpmail program written in progress.
My problem is, the sent time of the email that is sent out using smtpmail program is incorrect. However, the sent time is only incorrect when the mail recipient uses Lotus Notes. Other mail box like Outlook Express, Yahoo, Hotmail ... seems to have the correct sent time.

My progress software is running in IBM AIX machine with a timezone
"TAIST (GMT +08:00".

I will get an incorrect sent time whether I use or didn't use the timezone.
My client lotus notes.ini file specify the the timezone=-8.

Urgently seeking advice.

Thankx.
 
By incorrect what do you mean, is the time a factor of 8 hours out?

When you send email through the command line (eq using the mail command) on the AIX box to lotus notes is the time correct then?

Does the date command from AIX give you the correct time?

try the shell command
Code:
TZ=GMT+8 ;; export TZ
before running your program.
 
Simon Sweetman said:
By incorrect what do you mean, is the time a factor of 8 hours out?

When you send email through the command line (eq using the mail command) on the AIX box to lotus notes is the time correct then?

Does the date command from AIX give you the correct time?

try the shell command
Code:
TZ=GMT+8 ;; export TZ
before running your program.



HI,

Actually i'm running a scheduled job everyday at 7 am and the scheduled job will sent out emails to all my client suppliers. And here i'm using the smtpmail.p program to sent emails. The emails sent will depicts the time sent when we open up the mail. The sent time of the email that i received is 10:00 am but when this email is received by my client who is using lotus notes, the sent time is 6:00 pm.
That is what i mean by incorrect sent time.
As i mention this sent time is only incorrect when its recipient is using lotus notes.
I have tried sending email using AIX mail utility but the sent time is correct.
Timezone TAIST is actual GMT+8.

Urgently Seeking Advice.

Thanks In Advance.
 
This really does sound like the scheduled job isn't setting the timezone correctly. I do remember reading that cron had this trouble on AIX, but can't find any reference to it now. You may be best running a script from cron that manually sets the TZ variable (as shown above) before running your program. You could also try running your program in the foreground (ie directly from a login shell) and see how it goes.
 
Hi,

I am not that familiar with AIX but do you mean i have to set the timezone in the cronjob that i used to run the scheduled jobs?
By the way what does "TZ=GMT+8 ;; export TZ" do?
Will it affect any other settings if i run the above code?
Besides sending mail, the scheduled jobs runs other batch processes as well that is partly why i need to be very careful with the cronjobs.
Any other idea?

Urgently Seeking Advice.

Thanks In Advance.
 
Yes, you should set the timezone in the cronjob, this dosn't set the system wide timezone for everyone. It only sets a shell environment variable for the current running script (the export says to send the change to any other scripts or programs that are run from the current script).

If you have a cron script that runs a few things including your program and you want to be safe try the following:

Code:
#Save current timezone value
OLDTZ=$TZ
#Change timezone
TZ=GMT+8
export TZ
#
#Run your commands here (call progress in batch mode, etc)
#
#Restore timezone
TZ=$OLDTZ
#Rest of script now runs with old TZ value

hahsia17 said:
Hi,

I am not that familiar with AIX but do you mean i have to set the timezone in the cronjob that i used to run the scheduled jobs?
By the way what does "TZ=GMT+8 ;; export TZ" do?
Will it affect any other settings if i run the above code?
Besides sending mail, the scheduled jobs runs other batch processes as well that is partly why i need to be very careful with the cronjobs.
Any other idea?

Urgently Seeking Advice.

Thanks In Advance.
 
Hi,

Thanks anyway for the advice.
I have set the timezone within the smtpmail as follows:
timezone="GMT+8"
But this still fails to work correctly when the mail is open using Lotus Notes.

Then I tried changing it to timezone="+0800", an it works perfectly.
I then found out that there is a certain format when setting timezone and readable by lotus notes.
 
Back
Top