Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to set Date format in UTL_SMTP
aru wrote:
> Hi,
> I have one strange problem with UTL_SMTP.
>
> I am using the following code to set the date value and format in
> header buffer:
>
> header:= 'Date: '||TO_CHAR(SYSDATE,'fmDy, DD Mon YYYY fxHH24:MI:SS')||
> crlf||
> 'From: '||sender||''||crlf||
> 'Subject: '||subject||crlf||
> 'To: '||recipient||crlf||
> 'CC: '||ccrecipient ;
>
> With this method, the mails sent from database carry SYSDATE of the
> machine where the Oracle Database is running. In my case, database is
> running in India.
>
> People in US complain that they get future-dated mail. Since the
> database is running in India and there is time difference of 12 hr
> 30mins between the regions, this is expected. But when I send mail
> using Java Mail API, I did not have this kind of issue. Anything can
> be done for this???
>
> Help from somebody is highly appreciated.
>
> Thanks,
> Ary
My recommendation would be to stop sending email from India.
Running UTL_SMTP doesn't cost more money when done in the US or Western Europe.
Alternatively you could include a timezone correction but I prefer the first approach.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Tue Mar 20 2007 - 10:07:09 CDT