SQL & PL/SQL :: Send Email Attachment Using Utl_mail.send_raw Utility And Not Successful
Jun 6, 2011
I am trying to send an email attachment using "utl_mail.send_raw" utility and not successful. Constantly I keep getting an error:
"ORA-20001: An error has occured: ORA-20001: ORA-06508: PL/SQL: could not find program unit being called
ORA-06512: at "APPOWNER.SANDEEP_CT_FILE", line 103"
I think it's emanating from "ORA-06508: PL/SQL: could not find program unit being called".
a) this morning my production dba " utlmail.sql in DEVELOPMENT as sys.
b) Create or replace directory TEMP_SANDEEP as '/u01/data' (This was created so that BFILENAME could read it + "dbms_lob.fileopen" needs to access this from Oracle directory and not Operating system directory)
c) 'u01/data' exists on Unix development box.
d) Then I created the following procedure to create a text file (text file's name is currentdate.txt i.e. 06062011.txt) that has some information. Once created, the UTL_MAIL.SEND_RAW should pick this file up and email this to concerned parties(and in this case it's me as I am doing this on development environment).
Code for the above is as follows:
CREATE OR REPLACE procedure sandeep_ct_file is
/*Variable declarations */
v_dir_location varchar2(100);
v_file_name varchar2(100);
v_file_handle UTL_FILE.FILE_TYPE;
v_report LONG := chr(10)||'Prog Code' ||' '||
[code]....
Do I have to defined SMTP connections and parameters?
I need to send email with attachment file. The input file is reside in the server. Currently, i can create and send file through the email. But it is not the file that i want from the server, it is actually create the attachment file. How can i get the file from server and put it as attachment? below is the codes :
create or replace Procedure test_email_mt(p_sender IN VARCHAR2, p_recipient IN VARCHAR2, p_message IN VARCHAR2) as
I would like to send an email with attachment using a STORE PROCEDURE, with a PL/SQL, I was testing a package called SRW.RUN_REPORT but the problem is that the report generate a pdf file but this file is storage in application server because the report server run over the application, wo we can not get the physical file to send as attach.
the problem is generate the pdf file save in a place that we can get easier.
I developed a program to send e-mails from Oracle using both UTL_MAIL as well as UTL_SMTP. My requirement now is to send around 75,000 emails per day, When I tested for 1000 emails it is taking around 6 mins., Then for 75,000 it would be around 7-8 hours. Not to put the server busy for these many hours. Can we really send this much of e-mails from Oracle? UTL_MAIL is little faster than UTL_SMTP)
I need the pl/sql procedure that sends email with excel attachment using utl_smtp.The email procedure should take the excel attachment file from my local directory.
Below are my procedure and declaration. I can send email to internal and external with attachment.
But the attachment is blank. i don't know how to add path in the script. like i save 1 pic in d drive. from thr how i must do attachment.
below are the procedure
CREATE OR REPLACE PROCEDURE CUSTOMER.send_mail_2 (p_to IN VARCHAR2, p_from IN VARCHAR2, p_subject IN VARCHAR2, p_text_msg IN VARCHAR2 DEFAULT NULL, p_attach_name IN VARCHAR2 DEFAULT NULL, p_attach_mime IN VARCHAR2 DEFAULT NULL, [code].........
i want to send mail with xml attachment.i create a procedure to send mail, when i send pdf,text file, they are open properly but if i send xml file i does not open...
/* Formatted on 2010/09/24 15:25 (Formatter Plus v4.8.8) */ CREATE OR REPLACE PROCEDURE apps.send_mail AS p_sender VARCHAR2 (80) := 'my@company.com'; p_recipient VARCHAR2 (80)
Can i send a large file( over 1 million) as email attachment as .CSV file...?
I have a requirement to send a large file ".CSV" when the procedure / package is invoked as email attachment. The data in the CSV file is pulled from a table (as below).
(1) I tried below code to execute "send_email" which is uses utility UTL_SMTP. It is working fine with 100000 records and getting an email attachment with .csv (2) If more 100000 i am not getting any email / attachment.
I am looking forward to send a huge data like 1 million. >>>>>>>>>>>>>>>>>>>>> DECLARE l_clob CLOB; l_attach_text VARCHAR2 (32767); l_attach_text_h VARCHAR2 (32767); Cursor c1 is SELECT LOCATION,PARTY_NAME,ADDRESS1,CITY,STATE_PROV,COUNTRY,POSTAL_CODE FROM emp_table; [code].......
Send a CSV file as attachment in a mail PLSQL. MY CSV file is already present in server. I just need to pickup that file and send the same as mail attachment.
Actuall we requried to send and email from Oracle 10g database having attachements big in size aprox 10 to 30 MB.Is there any Custom Procedure or standard procedure for this.
We are using UTL_SMTP and UTL_MAIL (Only support RAW attachement upto 32 k in size).
I am sending email with attachment (word, pdf) without any problem. Now what i want is, instead of attachment that pdf / word file should come in body part , like means in internet explorer pdf open inside the browser itself while surfing. so means as soon as user open email, content of word / pdf should display in body part. how can i do this. using forms 6i, and database 10g.
I have a requirement to send email with attachment using PL/SQL procedure of 10g database. We will be querying data from database, generating excel(csv) file and attaching to email. How can I achieve this goal.
I have a procedure that will send email as HTML but it has limitations of sending 32K data.
CREATE OR REPLACE procedure send_email( p_to in varchar2, p_from in varchar2, p_subject in varchar2, p_text in varchar2 default null, [code]........
I need to email an excel file as an attachment in the mail through oracle procedure. I am using UTL_TCP option.
The remote_host i use in test environment is the 'name of the test server'. This test server is a oracle10g database on AIX server.In the test environment the mail works fine.
I have a requirement where I have to show attachment in R12.1.3 Sourcing Award Approval Notification.I am able to achieve this by adding #ATTACHMENTS attribute in the message and Attachment appears in the Notification in the E-Business work list but somehow its not appearing in "e-mail notification".
so I can reference it in my email body with <img src="cid:signature.jpg"/>. Well... I hope it is going to be shown inline anyway if I change Content-Disposition.
Currently (with Content-Disposition: attachment;) it works for Outlook, but, for instance, not in Gmail in the browser. Gmail shows the image separately as an attachment.
Is there a way to change the content-disposition with Apex?
I know it is possible to do it with utl_mail, but this is currently not installed in our databases. I need to involve our DBA to set this up, and I don't know if he is willing to do that.
Need info regarding sending an excel file attachment from plsql.I am using utl_smtp package in procedure and want to attach some sql query results in excel file.Is it possible to use sql query in same stored procedure that i am using to send the email attachment or i need to use external directory path to load the file as attachment.
I have ORacle XE installed on my machine and everything works fine. I can connect to it using forms, run my application etc. Now, I wanted to write a proc which can send email from Oracle XE.So after investigating, I think UTL_SMTP and UTL_MAIL are my options. For which I need to enable the ut_mail package and one more which I have done. But everytime I run a package, I get the error