RE: problem sending long email message from oracle

From: Goettelmann, Jay <jay.goettelmann_at_bms.com>
Date: Wed, 6 Apr 2011 13:31:50 -0400
Message-ID: <04931B2EDB42B849A8FB53364204051908891653C6_at_ushpwbmsmmp006.one.ads.bms.com>



I had the same problem. My email body was being truncated at the 1000th character.

I know this reply is coming months late, but in case anyone else runs into it...

I solved it by adding chr(13) || chr(10) at the ends of HTML lines in my message. Seems my message was being passed as a single line and reached the 1000 character limit.

For example:

v_msg :=                    '<html>';
v_msg := v_msg || '       <body>';
v_msg := v_msg || '                       <p>Email message</p>';
v_msg := v_msg || '       </body>';

v_msg := v_msg || '</html>';

Would be included in my mail message on one line as:

'<html><body><p>Email message</p></body></html>'

Once that string reached 1000 it was cut off.

Problem is solved when I add chr(13) || chr(10) as follows:

declare

                crlf                          VARCHAR(2)      := chr(13) || chr(10);
begin
                v_msg :=                    '<html>' || crlf;
v_msg := v_msg || '       <body>' || crlf;
v_msg := v_msg || '                       <p>Email message</p>' || crlf;
v_msg := v_msg || '       </body>' || crlf;
v_msg := v_msg || '</html>' || crlf;

--PASS THIS VARIABLE TO THE UTL_SMTP PACKAGE
--e.g. utl_smtp.data(v_conn, v_msg)
--I'M LEAVING OUT THE OPEN_CONNECTION, HELO, MAIL, RECPT CALLS TO KEEP THIS SIMPLE
end;



This message (including any attachments) may contain confidential, proprietary, privileged and/or private information. The information is intended to be for the use of the individual or entity designated above. If you are not the intended recipient of this message, please notify the sender immediately, and delete the message and any attachments. Any disclosure, reproduction, distribution or other use of this message or any attachments by an individual or entity other than the intended recipient is prohibited.

--

http://www.freelists.org/webpage/oracle-l Received on Wed Apr 06 2011 - 12:31:50 CDT

Original text of this message