Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Oracle Miscellaneous > Re: utl_mail ad...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 6878 of 7280
Post > Topic >>

Re: utl_mail adds CRLF at beginning of varchar2 attachments

by neil kodner <nkodner@[EMAIL PROTECTED] > May 6, 2008 at 02:57 PM

On May 6, 3:14=A0pm, yf...@[EMAIL PROTECTED]
 (Malcolm Dew-Jones)
wrote:
> neil kodner (nkod...@[EMAIL PROTECTED]
) wrote:
>
> : Using 10.2.0.3.0 on solaris, I'm trying to write some tests against
> : utl_mail.send_attach_varchar2. =A0I receive the email and the
> : attachments, but the attachment always begins with a leading blank
> : line. =A0I've tried varying the att_mime_type but am still having the
> : same problem. =A0The leading blank line is preventing applications
from
> : interpreting my RTF text.
>
> : Here's the code I'm using. =A0This example uses RTF, but examples
using
> : straight text have also failed (below)
>
> : rtf example:
> : exec =A0 UTL_MAIL.SEND_ATTACH_VARCHAR2(
> : =A0 =A0 =A0 =A0 =A0sender =3D> '...@[EMAIL PROTECTED]
'
> : =A0 =A0 =A0 =A0 ,recipients =3D> '...@[EMAIL PROTECTED]
'
> : =A0 =A0 =A0 =A0 ,cc =3D> NULL
> : =A0 =A0 =A0 =A0 ,bcc =3D> =A0NULL
> : =A0 =A0 =A0 =A0 ,subject =3D> 'send_attach_varchar2'
> : =A0 =A0 =A0 =A0 ,message =3D> 'here is a test of send_attach_varchar2'
> : =A0 =A0 =A0 =A0 ,mime_type =3D> 'text/plain; charset=3Dus-ascii'
> : =A0 =A0 =A0 =A0 ,priority =3D> 3
> : =A0 =A0 =A0 =A0 ,attachment =3D> '{\rtf1\ansi{\fonttbl\f0\fswiss
Helveti=
ca;}
> : \f0\pard This is some {\b bold} text.\par}'
> : =A0 =A0 =A0 =A0 ,att_inline =3D> TRUE
> : =A0 =A0 =A0 =A0 ,att_mime_type=3D>'application/rtf'
> : =A0 =A0 =A0 =A0 ,att_filename =3D> 'rtftest2.rtf'
> : =A0 =A0 );
>
> : plain text example:
> : exec UTL_MAIL.SEND_ATTACH_VARCHAR2(
> : sender =3D> '...@[EMAIL PROTECTED]
'
> : ,recipients =3D> '...@[EMAIL PROTECTED]
'
> : ,cc =3D> NULL
> : ,bcc =3D> NULL
> : ,subject =3D> 'scheduled disco mail'
> : ,message =3D> 'Testing testing testing'
> : ,mime_type =3D> 'text/plain; charset=3Dus-ascii'
> : ,priority =3D> 1
> : ,attachment =3D> 'should be in my attachment'
> : ,att_inline =3D> FALSE
> : ,att_mime_type =3D> 'text/plain; charset=3Dus-ascii'
> : ,att_filename =3D> 'neil.txt'
> : );
>
> I'm not familiar with UTL_MAIL, but the mime type of a message with
> attachments can't be 'text/plain; charset=3Dus-ascii' . =A0It has to be
so=
me
> 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.
 




 3 Posts in Topic:
utl_mail adds CRLF at beginning of varchar2 attachments
neil kodner <nkodner@[  2008-05-06 12:00:25 
Re: utl_mail adds CRLF at beginning of varchar2 attachments
yf110@[EMAIL PROTECTED]   2008-05-06 13:14:26 
Re: utl_mail adds CRLF at beginning of varchar2 attachments
neil kodner <nkodner@[  2008-05-06 14:57:02 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 0:15:18 CST 2008.