FAQ
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 := '';
v_msg := v_msg || ' ';
v_msg := v_msg || ' Email message';
v_msg := v_msg || ' ';

v_msg := v_msg || '';

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

'Email message'

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 := '' || crlf;
v_msg := v_msg || ' ' || crlf;
v_msg := v_msg || ' Email message' || crlf;
v_msg := v_msg || ' ' || crlf;

v_msg := v_msg || '' || 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.

Search Discussions

  • Anonymous at Apr 7, 2011 at 7:18 am
    Morning Jay,

    this also works - and you don't have to worry about using Windows or
    Unix line ends:

    v_msg := '



    Email message

    ';

    Also, it may just have been Outlook, or whatever you use to send email,
    but your single quotes were converted into "not-very-smart-quotes"
    which, when copied and pasted into Toad/SQLPlus/etc, break things!

    Cheers,
    Norman.

    Norman Dunbar
    Contract Senior Oracle DBA
    Capgemini Database Team (EA)
    Internal : 7 28 2051
    External : 0113 231 2051

    Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.

    We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
    We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.

    If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouporacle-l @
categoriesoracle
postedApr 6, '11 at 5:31p
activeApr 7, '11 at 7:18a
posts2
users2
websiteoracle.com

2 users in discussion

Anonymous: 1 post Goettelmann, Jay: 1 post

People

Translate

site design / logo © 2022 Grokbase