Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Send email whith oracle
On 28 Nov 2005 08:34:50 -0800, "Alen Cappelletti" <cocker_at_libero.it> wrote:
>I write from Italy and with this procedure I want send a E-mail from
>Oracle.
>Ok, all works fine except the messagge body.
>
> v_header:= 'Date: '||TO_CHAR(SYSDATE,'dd Mon yy hh24:mi:ss')||crlf||
> 'From: '||v_sender||''||crlf||
> 'Subject: '||v_subject||crlf||
> 'To: '||v_recipient||crlf||
> 'CC: '||v_ccrecipient;
OK, so v_header doesn't end in CRLF.
[snip]
> --
> -- Write the header
> --
> utl_smtp.write_data(l_mail_conn, v_header);
You write v_header, and you're still on the same line - no CRLF output yet.
> utl_smtp.write_data(l_mail_conn, crlf||v_message ) ;
You write out one CRLF, and then start the body; but you need another CRLF before the body, to terminate the header section with a blank line.
The write_data line for v_header probably just needs "||crlf".
-- Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis toolReceived on Mon Nov 28 2005 - 14:07:22 CST