473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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.

Jun 27 '08 #1
1 3536
"Anna C. Dent" <an*******@hotmail.comwrote in message news:<BTkRa.453$Ne.16@fed1read03>...
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!
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: bmcelhany | last post by:
I have a windows service that monitors a directory for newly created files. When one is found, an e-mail is generated and the new file is added as an attachment. In order to avoid trying to attach...
1
by: ohb | last post by:
Hello, is someone have a example of c# source of a service which is reading a attach file of an email.? Thank you. OHB.
2
by: ohb | last post by:
Hello, Is it possible to parse a attach file in a email ? ohb
5
by: Jess | last post by:
I'm trying to build a page that the user can attach a file/s to and email them thru a form. I see plenty of info on how to actually code it to send with a variable - but how do you build a form...
2
by: calebmichaud | last post by:
Hi I am having trouble understanding how to attach a file or files to a record. I want to (in form view0 allow the user to attach one or more than one file to the associated record, and then...
1
nirmalsingh
by: nirmalsingh | last post by:
hi everybody, my code for sending email is <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Untitled Document</title>...
3
by: =?Utf-8?B?YmVueQ==?= | last post by:
See the ASP code below in order to send an email. How can I attach a file to this email please? set objMailer = Server.CreateObject("CDONTS.Newmail") objMailer.From = "anySender@123.com"...
7
by: RRsonawane11 | last post by:
Hello, Can anyone know how to write asp code to attach one file and email it to a specified email address. The attach file is the client choose from their Local Harddisk, just like we ...
2
by: Ken | last post by:
I have a large text file that is send with mail. I would like to save the text as a file (*.txt) and then attach it to the email. Can I do that with PHP? How do I save the text $body as a...
10
EJaques
by: EJaques | last post by:
(Using Access 2003) I have a an Object OLE field in a table where users can insert Excel sheets, Word Docs, Pdfs etc. I need to create a button on a formulaire that allows the user to browse...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.