Re: Attach a file in UTL_SMTP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Anna C. Dent

    Re: Attach a file in UTL_SMTP

    Jorge Pinto wrote:
    Hello folks,
    >
    I'm trying to use my send_mail procedure to attach a file and send the email
    to the user using utl_smtp. I got the attachment file but it was my message
    body and not my file that I wanted to. Any ideia what I'm doing wrong ?
    >
    I tried to use the following code
    utl_smtp.write_ data(conn, 'Content-Disposition : attachment; filename="'||
    p_filename ||'"' || utl_tcp.CRLF);
    >
    Thanks in advance,
    >
    JP
    You need to manually & properly MIME format the message.

  • ellie

    #2
    Re: Attach a file in UTL_SMTP

    "Anna C. Dent" <anacedent@hotm ail.comwrote in message news:<BTkRa.453 $Ne.16@fed1read 03>...
    Jorge Pinto wrote:
    Hello folks,

    I'm trying to use my send_mail procedure to attach a file and send the email
    to the user using utl_smtp. I got the attachment file but it was my message
    body and not my file that I wanted to. Any ideia what I'm doing wrong ?

    I tried to use the following code
    utl_smtp.write_ data(conn, 'Content-Disposition : attachment; filename="'||
    p_filename ||'"' || utl_tcp.CRLF);

    Thanks in advance,

    JP
    >
    You need to manually & properly MIME format the message.
    As far as I know, UTL_SMTP package doesn't support file attachments,
    but you can use javamail to send emails with file attachments!

    Comment

    Working...