Re: utl_mail adds CRLF at beginning of varchar2 attachments

From: <subhajit.dattagupta_at_gmail.com>
Date: Tue, 3 Feb 2015 21:40:24 -0800 (PST)
Message-ID: <765b4dad-921e-4053-a64d-0e69b21a654f_at_googlegroups.com>



On Tuesday, May 6, 2008 at 2:00:25 PM UTC-5, neil kodner wrote:
> Using 10.2.0.3.0 on solaris, I'm trying to write some tests against
> utl_mail.send_attach_varchar2. I receive the email and the
> attachments, but the attachment always begins with a leading blank
> line. I've tried varying the att_mime_type but am still having the
> same problem. The leading blank line is preventing applications from
> interpreting my RTF text.
>
> Here's the code I'm using. This example uses RTF, but examples using
> straight text have also failed (below)
>
> rtf example:
> exec UTL_MAIL.SEND_ATTACH_VARCHAR2(
> sender => 'xxx_at_domain.com'
> ,recipients => 'xxx_at_domain.com'
> ,cc => NULL
> ,bcc => NULL
> ,subject => 'send_attach_varchar2'
> ,message => 'here is a test of send_attach_varchar2'
> ,mime_type => 'text/plain; charset=us-ascii'
> ,priority => 3
> ,attachment => '{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}
> \f0\pard This is some {\b bold} text.\par}'
> ,att_inline => TRUE
> ,att_mime_type=>'application/rtf'
> ,att_filename => 'rtftest2.rtf'
> );
>
> plain text example:
> exec UTL_MAIL.SEND_ATTACH_VARCHAR2(
> sender => 'xxx_at_oracle.com'
> ,recipients => 'xxx_at_domain.com'
> ,cc => NULL
> ,bcc => NULL
> ,subject => 'scheduled disco mail'
> ,message => 'Testing testing testing'
> ,mime_type => 'text/plain; charset=us-ascii'
> ,priority => 1
> ,attachment => 'should be in my attachment'
> ,att_inline => FALSE
> ,att_mime_type => 'text/plain; charset=us-ascii'
> ,att_filename => 'neil.txt'
> );

Any help on this? how to avoid Oracle First line empty when using UTL_MAIL.send_attach_varchar2? Received on Wed Feb 04 2015 - 06:40:24 CET

Original text of this message