dbTalk Databases Forums  

utl_mail adds CRLF at beginning of varchar2 attachments

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss utl_mail adds CRLF at beginning of varchar2 attachments in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
neil kodner
 
Posts: n/a

Default utl_mail adds CRLF at beginning of varchar2 attachments - 05-06-2008 , 02:00 PM






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 (DOT) com'
,recipients => 'xxx (AT) domain (DOT) 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 (DOT) com'
,recipients => 'xxx (AT) domain (DOT) 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'
);

Reply With Quote
  #2  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: utl_mail adds CRLF at beginning of varchar2 attachments - 05-06-2008 , 04:14 PM






neil kodner (nkodner (AT) gmail (DOT) com) 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 (DOT) com'
: ,recipients => 'xxx (AT) domain (DOT) 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 (DOT) com'
: ,recipients => 'xxx (AT) domain (DOT) 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'
: );

I'm not familiar with UTL_MAIL, but the mime type of a message with
attachments can't be 'text/plain; charset=us-ascii' . It has to be some
sort of multi part, like 'multipart/mixed'


Reply With Quote
  #3  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: utl_mail adds CRLF at beginning of varchar2 attachments - 05-06-2008 , 04:14 PM



neil kodner (nkodner (AT) gmail (DOT) com) 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 (DOT) com'
: ,recipients => 'xxx (AT) domain (DOT) 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 (DOT) com'
: ,recipients => 'xxx (AT) domain (DOT) 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'
: );

I'm not familiar with UTL_MAIL, but the mime type of a message with
attachments can't be 'text/plain; charset=us-ascii' . It has to be some
sort of multi part, like 'multipart/mixed'


Reply With Quote
  #4  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: utl_mail adds CRLF at beginning of varchar2 attachments - 05-06-2008 , 04:14 PM



neil kodner (nkodner (AT) gmail (DOT) com) 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 (DOT) com'
: ,recipients => 'xxx (AT) domain (DOT) 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 (DOT) com'
: ,recipients => 'xxx (AT) domain (DOT) 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'
: );

I'm not familiar with UTL_MAIL, but the mime type of a message with
attachments can't be 'text/plain; charset=us-ascii' . It has to be some
sort of multi part, like 'multipart/mixed'


Reply With Quote
  #5  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: utl_mail adds CRLF at beginning of varchar2 attachments - 05-06-2008 , 04:14 PM



neil kodner (nkodner (AT) gmail (DOT) com) 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 (DOT) com'
: ,recipients => 'xxx (AT) domain (DOT) 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 (DOT) com'
: ,recipients => 'xxx (AT) domain (DOT) 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'
: );

I'm not familiar with UTL_MAIL, but the mime type of a message with
attachments can't be 'text/plain; charset=us-ascii' . It has to be some
sort of multi part, like 'multipart/mixed'


Reply With Quote
  #6  
Old   
neil kodner
 
Posts: n/a

Default Re: utl_mail adds CRLF at beginning of varchar2 attachments - 05-06-2008 , 04:57 PM



On May 6, 3:14*pm, yf... (AT) vtn1 (DOT) victoria.tc.ca (Malcolm Dew-Jones)
wrote:
Quote:
neil kodner (nkod... (AT) gmail (DOT) com) 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 => '... (AT) domain (DOT) com'
: * * * * ,recipients => '... (AT) domain (DOT) 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 => '... (AT) oracle (DOT) com'
: ,recipients => '... (AT) domain (DOT) 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'
: );

I'm not familiar with UTL_MAIL, but the mime type of a message with
attachments can't be 'text/plain; charset=us-ascii' . *It has to be some
sort of multi part, like 'multipart/mixed'
Thanks for the follow-up. I am very inexperienced with email as it
relates to MIME types, etc. However, I tried chaing the mime_type and
the att_mime_type to multipart/mixed (independently and together), and
each time, the email was sent without an attachment.


Reply With Quote
  #7  
Old   
neil kodner
 
Posts: n/a

Default Re: utl_mail adds CRLF at beginning of varchar2 attachments - 05-06-2008 , 04:57 PM



On May 6, 3:14*pm, yf... (AT) vtn1 (DOT) victoria.tc.ca (Malcolm Dew-Jones)
wrote:
Quote:
neil kodner (nkod... (AT) gmail (DOT) com) 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 => '... (AT) domain (DOT) com'
: * * * * ,recipients => '... (AT) domain (DOT) 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 => '... (AT) oracle (DOT) com'
: ,recipients => '... (AT) domain (DOT) 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'
: );

I'm not familiar with UTL_MAIL, but the mime type of a message with
attachments can't be 'text/plain; charset=us-ascii' . *It has to be some
sort of multi part, like 'multipart/mixed'
Thanks for the follow-up. I am very inexperienced with email as it
relates to MIME types, etc. However, I tried chaing the mime_type and
the att_mime_type to multipart/mixed (independently and together), and
each time, the email was sent without an attachment.


Reply With Quote
  #8  
Old   
neil kodner
 
Posts: n/a

Default Re: utl_mail adds CRLF at beginning of varchar2 attachments - 05-06-2008 , 04:57 PM



On May 6, 3:14*pm, yf... (AT) vtn1 (DOT) victoria.tc.ca (Malcolm Dew-Jones)
wrote:
Quote:
neil kodner (nkod... (AT) gmail (DOT) com) 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 => '... (AT) domain (DOT) com'
: * * * * ,recipients => '... (AT) domain (DOT) 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 => '... (AT) oracle (DOT) com'
: ,recipients => '... (AT) domain (DOT) 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'
: );

I'm not familiar with UTL_MAIL, but the mime type of a message with
attachments can't be 'text/plain; charset=us-ascii' . *It has to be some
sort of multi part, like 'multipart/mixed'
Thanks for the follow-up. I am very inexperienced with email as it
relates to MIME types, etc. However, I tried chaing the mime_type and
the att_mime_type to multipart/mixed (independently and together), and
each time, the email was sent without an attachment.


Reply With Quote
  #9  
Old   
neil kodner
 
Posts: n/a

Default Re: utl_mail adds CRLF at beginning of varchar2 attachments - 05-06-2008 , 04:57 PM



On May 6, 3:14*pm, yf... (AT) vtn1 (DOT) victoria.tc.ca (Malcolm Dew-Jones)
wrote:
Quote:
neil kodner (nkod... (AT) gmail (DOT) com) 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 => '... (AT) domain (DOT) com'
: * * * * ,recipients => '... (AT) domain (DOT) 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 => '... (AT) oracle (DOT) com'
: ,recipients => '... (AT) domain (DOT) 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'
: );

I'm not familiar with UTL_MAIL, but the mime type of a message with
attachments can't be 'text/plain; charset=us-ascii' . *It has to be some
sort of multi part, like 'multipart/mixed'
Thanks for the follow-up. I am very inexperienced with email as it
relates to MIME types, etc. However, I tried chaing the mime_type and
the att_mime_type to multipart/mixed (independently and together), and
each time, the email was sent without an attachment.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.