SQL & PL/SQL :: Email Excel File As Attachment In Mail Through Oracle Procedure?
Mar 3, 2011
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.
utl_tcp.open_connection(remote_host => 'test server',
remote_port => 25,
tx_timeout => null);
The same thing if i use in production environment, it does not work. The production server is a 9i database on a unix server.
utl_tcp.open_connection(remote_host => 'prod server',
remote_port => 25,
tx_timeout => null);
Does the 10g has option to host SMTP service as apposed to 9i?
View 12 Replies
ADVERTISEMENT
Nov 24, 2010
send script to send mail with excel attachment using smtp from Oracle 9i
View 1 Replies
View Related
Aug 4, 2011
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.
View 6 Replies
View Related
Sep 24, 2010
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)
[code]....
View 1 Replies
View Related
Mar 15, 2011
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.
View 1 Replies
View Related
Jun 17, 2011
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.
View 8 Replies
View Related
Nov 23, 2010
How to Sending Email With PDF File attachment.
View 3 Replies
View Related
Apr 10, 2013
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]........
View 21 Replies
View Related
Jul 24, 2013
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].........
View 2 Replies
View Related
Jan 29, 2012
We need to display a pdf file in the email generated through the oracle database procedure.
We created a blob object to store the pdf file and it is working fine then we created a package to read the file and display it but when i am running the procedure from the sqlplus prompt the following message is appearing
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.OWA_UTIL", line 325
ORA-06512: at "SYS.OWA_UTIL", line 377
ORA-06512: at "WHADMIN.IMAGE_GET", line 14
ORA-06512: at line 1
i am copying the procedure and package that i created for the same
create table demo
( id int primary key,
theBlob blob
)
declare
l_blob blob;
l_bfile bfile;
[code]....
when i am running image_get.pdf(1) from sqlplus prompt following error message is displayed on the screen
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.OWA_UTIL", line 325
ORA-06512: at "SYS.OWA_UTIL", line 377
ORA-06512: at "WHADMIN.IMAGE_GET", line 14
ORA-06512: at line 1
View 4 Replies
View Related
Nov 23, 2010
i am able to send text/ csv attachment thru oracle PL/Sql Procedure. But i am facing this for excel attachment, some junk character is coming while opening that attachment excel file.
i am attaching here with my coding for your view. Anything i have to configure at my SMTP server.
View 5 Replies
View Related
Dec 29, 2010
send me the procedure for loading the data in an oracle table into an excel file.
View 5 Replies
View Related
Feb 7, 2011
Query :"how to send mail to lotus notes with attachment from oracle forms"?
View 2 Replies
View Related
Jun 7, 2010
How to send mail with attachment ?
View 2 Replies
View Related
May 5, 2010
i am using oracle forms 9i and i want to send a mail with attachment.
View 1 Replies
View Related
Apr 5, 2011
I can send mail with UTL_MAIL using this:
CREATE OR REPLACE PROCEDURE send_mail_file_seti IS
BEGIN
UTL_MAIL.SEND_ATTACH_VARCHAR2(
sender => 'mail@from.com',
recipients => 'mail@to.com',
message => '<HTML><BODY>See attachment</BODY></HTML>',
[code]........
What I want to do is send mail attaching a file from file system. For example, I have this file:
/oracle/pmp/file
I want to send it using a procedure like the one above.
View 6 Replies
View Related
May 4, 2010
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
[code]...
View 5 Replies
View Related
Jun 19, 2009
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.
View 7 Replies
View Related
May 1, 2009
I have the following code to send an email with a report as an attachment via forms. everything is running fine.
Now i do not have a message body in the email, so my question is how do i add some text as an email body
if i add the following parameter, its not working
ADD_PARAMETER(thelist, 'BODY',TEXT_PARAMETER, 'Check the attached Report');
DECLARE
report_id REPORT_OBJECT := find_report_object('checklist');
report_message VARCHAR2(100) :='';
rep_status VARCHAR2(100) :='';
[code]....
View 6 Replies
View Related
Jun 22, 2010
I need to send email notifications with attachments. Below is my testing codes.
declare
text varchar2(32000);
crlf VARCHAR2(2) := chr(13)||chr(10);
begin
text := 'Test only'||crlf||'test 2'||crlf||'test 3';
UTL_MAIL.SEND_ATTACH_VARCHAR2(
[code]......
I notice that, there is an empty line at the top of the content of this file. I don't want the empty line to be included in my file.
View 4 Replies
View Related
Jun 21, 2013
I am trying to add an image as attachment to an e-mail.
I am reading the image from the table and then passing it as a BLOB in my procedure.
Following is the part of the code which adds the attachment
{code}
PROCEDURE add_mail_attachment
(
/*
[Code].....
View 10 Replies
View Related
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?
View 10 Replies
View Related
Oct 9, 2013
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".
View 0 Replies
View Related
Sep 17, 2013
I am using apex_mail (in Apex 4.1) to send emails with an attachment.
v_mail_id := apex_mail.send(
p_to => 'somebody@gmail.com'
...etc...
);
apex_mail.add_attachment( p_mail_id => v_mail_id
,p_attachment => v_image
,p_filename => 'signature.jpg'
,p_mime_type => 'image/jpeg');
Apex creates this as an attachment:
Content-Disposition: attachment;
I would like to change it to inline:
Content-Disposition: inline;
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.
View 2 Replies
View Related
Mar 21, 2012
I need a PL/SQL code to convert an excel file to xml file.
View 3 Replies
View Related
Sep 24, 2010
I've written a pl/sql to send mail. It works fine. Now i want to modify it to send an attachment txt/scv/xls file.This file is residing on client's pc.How to do it?
Following is pl/sql for sending mail.
create or replace PROCEDURE SEND_MAIL(P_SENDER IN VARCHAR2,P_RECIPIENT IN VARCHAR2,P_MESSAGE IN VARCHAR2,P_SUBJECT IN VARCHAR2 )IS
MAILHOST VARCHAR2(30) := 'MAILHOST.TIFR.RES.IN';
MAIL_CONN UTL_SMTP.CONNECTION;
BEGIN
MAIL_CONN := UTL_SMTP.OPEN_CONNECTION(MAILHOST, 25); -- TYPICALY 25 S THE PORT NUMBER FOR INCOMMING SMTP REQUESTS ON YOUR SMTP MAIL HOST
UTL_SMTP.MAIL(MAIL_CONN, '<'||P_SENDER||'>'); -- THE '<' AND '>' DEPEDS ON WHAT TYPE OF SMTP MAIL HOST U'RE RUNNING THIS ONE'S A NETSCAPE SMTPHOST
[code]......
View 2 Replies
View Related
Apr 22, 2013
What is the usage of UTL_HTTP?
Will I be able to send e-mail with UTL_HTTP to an external mail id?
View 5 Replies
View Related
Oct 7, 2013
I have to embed a picture as a header with an e-mail content for my work, I google'd and tested with different options but I failed. (The JPG is stored in a table as a blog object) When I tried with the below code the JPG file is e-mailed as an attachment with an e-mail content, I want it to be displayed inside an e-mail.
I tried att_inline: TRUE option as well - still not working.
Here is my code I tested and worked as an attachment.
DECLARE
/*LOB operation related varriables */
v_src_loc BLOB :=EMPTY_BLOB;
l_buffer RAW(54);
l_amount BINARY_INTEGER := 54;
l_pos INTEGER := 1;
l_blob BLOB := EMPTY_BLOB;
[code]....
View 3 Replies
View Related
Apr 5, 2013
I have countries, sites, states tables (total 3) in database (i have user id and password to connect to this database).
every week i need to extract data from these tables into excel files and i need to save those in shared drive for team use.
Currently i am connecting to database every time running sql query and manually exporting that latest data to excel and saving that as excel files in (G: eamcommon) folder with specific name.
output format should be :
excel (.xls)
file names should - countries.xls,sites.xls,states.xls
server name : ap21
output location : G: eamcommon ( G is shared drive).
i heard that we could create batch file to do this task and also we could use oracle procedure to do this task. but not sure which one is the best option.
View 3 Replies
View Related
Jul 2, 2012
How to import data from excel(.xls) file to data base table
I have excel sheet(.xls) data details, I neet to upload details to data base table using procedure
excel sheet is not CSV file, so SQL Loader is not using
any alternative solution for this issue
View 3 Replies
View Related