I need not to use Oracle as a "ftp" server
belal, July 21, 2002 - 10:44 am UTC
hello Mr tom
the reason of asking first question is that
i need to send mail with attachment and i success just using pl/sql code with out using any java code but the problem is that when i try to send attachment i need first to put the attached file in the created directory in the database serve....so i need the user to select the file from his local pc and internaly by the oracle the file will saved in database directory and then the file will be sent.....I need not to use Oracle as a "ftp" server ........thank u sir :o)
July 21, 2002 - 11:16 am UTC
No you don't (need to put the file on the server)
You can send it directly. See
</code>
http://asktom.oracle.com/pls/asktom/f?p=100:11:::::P11_QUESTION_ID:1739411218448 <code>
for example (or even easier, use javamail)
In any case, you can use the UTL_FILE_DIR, set it to c:\temp\, and then proceed to use UTL_FILE to write to a file on the server using your stored procedure. UTL_FILE only supports TEXT files (eg: a .doc or .ppt file is binary and WON'T work). If you need support for binary files, you'll be using either a C external procedure OR a java stored procedure (or you'll get 9iR2)
What is new with regards Binary File in R2
A reader, July 22, 2002 - 3:19 am UTC
Hi,
<Quote>
If you need support for binary files, you'll be using either a C
external procedure OR a java stored procedure (or you'll get 9iR2)
</Quote>
Can u pls eloborate on the above. What is new in R2 that allows me to read Binary Files ??
Regards,
Ganesh R
July 22, 2002 - 9:40 am UTC
In 9iR2 utl_file supports reading and writing binary files from PLSQL (there is a get and put raw API)
as well as lots of other new functions in UTL_FILE. goto otn.oracle.com and read the supplied packages guide for 9iR2 for details
Using UTL_SMTP for Reporting
Rahul Dutta, November 30, 2005 - 11:10 pm UTC
Tom,
Let me first start with explaining the problem and then the workaround I've done. I would need your expert view on this.
Problem:
I've to take daily export of 5 schema's in different Instances which I've scheduled at particular point of time. This is working fine. But, when I want to report the result of the export, I'm facing some problem.
Solution:
I've configured UTL_SMTP to report the sucesss or failure of the export. But my requirement is to send the entire export log file. The one way I could think of is attaching the export log file but for this I've use JAVA API along with UTL_SMTP. Correct me if I'm wrong?
Question:
Is there any way I can read the log file and send it using UTL_SMTP as text/html?
Thanks for helping me out...
Rahul
December 01, 2005 - 12:23 pm UTC
well, utl mail in 10g is to have support for attachments (have not used it), but sure, you can send attachments if you want to write the code to do so. you would have to figure out what the "spec" is for encoding attachments and then write that out with utl_smtp, similar to what tyler did here for html:
</code>
http://asktom.oracle.com/pls/asktom/f?p=100:11:::::P11_QUESTION_ID:1739411218448 <code>
How to do it in (iR2
Hashmat, March 14, 2007 - 1:26 pm UTC
Sir, how to create files in DIRECTORY object from client from forms6i in 9iR2? The file is a word document (.doc) and is created on the client and should be moved to DIRECTORY object (server's local directory)?
March 15, 2007 - 7:14 am UTC
you can always use a stored procedure calling dbms_lob to accept the data you read in your client (dbms_lob.writeAppend to a lob locator you create)
You might ask other forms users however for the best way for forms to do this - otn.oracle.com -> discussion forums.
A reader, March 16, 2010 - 2:40 am UTC