SQL & PL/SQL :: Send Mail From Procedure With Attach From File System

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


ADVERTISEMENT

SQL & PL/SQL :: Send Mail With XML File Attachment?

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

Send CSV File As Attachment In Mail PL/SQL

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

SQL & PL/SQL :: How To Check Availability Of Mail Server For Send Mail

Jul 28, 2012

I m using UTL_SMTP to send mail using my mail server. could i check the availability of 1st mail server, if not available then could i set alternate mail server.

View 7 Replies View Related

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 View Related

Send Mail Using SQL

Feb 23, 2009

I want to send mail using plsql.I know that this can be possible by UTL_SMTP package.So I went thro some doc's & I tried this code :

PROCEDURE send_test_message
IS
mailhost VARCHAR2(64) := 'mailhost.fictional-domain.com'; /*(my computer name)*/
sender VARCHAR2(64) := 'prasadsug@yahoo.com';
recipient VARCHAR2(64) := 'prasadsug@rediffmail.com';
mail_conn utl_smtp.connection;
BEGIN
mail_conn := utl_smtp.open_connection(mailhost, 25);
utl_smtp.helo(mail_conn, mailhost);
[code]....

I got 'ora-00900:INVALID SQL STATEMENT'. which line i've done the mistake .how to rectify that?.

View 5 Replies View Related

PL/SQL :: How To Send A Mail

Aug 6, 2013

I have a requirement how to send a mail from pl/sql procedure and that mail content will be in HTML format and the data i have to fetch from one table

View 2 Replies View Related

Forms :: Send SMS And Mail Through 6i?

Feb 17, 2012

how can i send sms and mail through d2k 6i form?

View 14 Replies View Related

SQL & PL/SQL :: How To Send Mail From Oracle

Jul 26, 2011

I had a question :

How to send mail from Oracle ??

Implement utl_mail??

How to implement ?? , or have any examples for reference??

View 6 Replies View Related

Send ORA-error Alert Through Mail?

Feb 20, 2011

how to create trigger or procedure for send all ORA- error alert mail from database. if any ORA - error comes in ALERT_SID.log then after trigger send the mail to my mail id

View 4 Replies View Related

Forms :: How To Send Mail With Attachment

Jun 7, 2010

How to send mail with attachment ?

View 2 Replies View Related

SQL & PL/SQL :: How To Send Mail From Oracle Database

Jun 21, 2013

i want to send mail from database for this

C:UsersAdministrator>sqlplus
SQL*Plus: Release 11.2.0.1.0 Production on Fri Jun 21 16:03:04 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter user-name: sys@orcl as sysdba
Enter password:

Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select name from v$database;
NAME
---------
ORCL
SQL> @ F:oracleproduct10.2.0db_1RDBMSADMINutlmail.sql

[code]....

View 17 Replies View Related

SQL & PL/SQL :: Unable To Send Mail Using UTL SMTP

Mar 6, 2013

I am using utl_smtp to send emails. I am getting the below error message.

Error in XX(Package name) ORA-29279: SMTP permanent error: 501 5.5.2 Syntax error in parameters scanning "TO" at - 5150
Error in XX(Package name) ORA-29277: invalid SMTP operation at - 5200
Error in XX(Package name) ORA-29277: invalid SMTP operation at - 5200
Error in XX(Package name) ORA-29277: invalid SMTP operation at - 7200
Error in XX(Package name) ORA-29277: invalid SMTP operation at - 6000
Error in XX(Package name) ORA-29277: invalid SMTP operation at - 7250
Error in XX(Package name) ORA-29277: invalid SMTP operation at - 8450.

I have checked the mail id in the "TO" list and found them to be valid. Is there could be any other reason? I have run this package in test instance and it is working fine. I am able to receive mails. In the test instance, I have put my mail id in the to list.

View 1 Replies View Related

SQL & PL/SQL :: Send Output As Xls Sheet In Mail

Jan 9, 2012

give procedure that sends mail as an attachment. I have a query.. It should send the output as a xls sheet in the mail.

View 1 Replies View Related

SQL & PL/SQL :: Send Mail As HTML Format In Oracle?

Mar 23, 2012

I want to send the mail as HTML format in oracle.

The email message column is in clob datatype .

if i click the column it shows the text output(various tags ,symbols)

if i click the HTML it shows the correct format .,

i m sending the mail using that message column .,the mail Received with the text format ,actually i need it in the html format., How to send HTML output?

View 4 Replies View Related

Forms :: How To Send Reports From D2k Form To Mail

Jul 21, 2011

How to send reports from d2k form to mail.

View 1 Replies View Related

SQL & PL/SQL :: Sending Mail Through UTL_SMTP / Unable To Send CLOB In It

Sep 14, 2010

I am sending mail thru UTL_SMTP. But i am unable to send the CLOB in it.If i break the CLOB into varchar2 then also it doesn't work.

Variables:-
vBuffer VARCHAR2 (4000);
l_amount BINARY_INTEGER := 4000;
l_pos PLS_INTEGER := 1;
l_clob_len PLS_INTEGER;
[code].....

While using the write_data procedure it is giving error as "Invalid OPeration"...how we can send the mail with CLOB.

View 1 Replies View Related

Application Express :: Send Mail To GMAIL With Attachments

Feb 25, 2013

I am able to send mail to Gmail from APEX. How an attachment can be send along with it.

View 6 Replies View Related

SQL & PL/SQL :: Get Result Query Of Three Columns And Pass Into Send-mail Proc?

May 10, 2011

I had never done this before, basically I need to get the result of the SQL query which had three columns and pass into thesend _mail proc, should I build a variable to hold the 3 value and send mail from it?

below is my send_mail proc

Quote:
CREATE OR REPLACE PROCEDURE SEND_MAIL (
msg_to varchar2,
msg_subject varchar2,
msg_text varchar2 )

[code]...

and below is my sql query
Quote:
select a.id, b.hr_info, c.details
from contact a, employees b, grid c
where a.id=b.id
and b.hc=c.hc

View 1 Replies View Related

SQL & PL/SQL :: Attach External File Using UTL_SMTP Package?

Feb 7, 2012

I want to attache an external file to a email using UTL_SMTP package.

A file which attach will be present in directory.

View 3 Replies View Related

Reports & Discoverer :: How To Attach Excel File As Last Page Of RDF Report

Aug 3, 2012

I have an .xls file which needs to be the last page of an rdf report. I would prefer to not type up the contents of the file and lay them out. Is there some way I can link this to the footer section or any other alternative?

View 2 Replies View Related

Forms :: How To Send Mail To Lotus Notes With Attachment From Oracle Forms

Feb 7, 2011

Query :"how to send mail to lotus notes with attachment from oracle forms"?

View 2 Replies View Related

SQL & PL/SQL :: Authenticate Mail Using A Procedure

Apr 25, 2010

I need to authenticate mails against a new mail server.

Earlier I used a procedure to send mails which worked until now. Now I will not be able to complete my job of sending emails unless I authenticate them. I have already surfed and researched my problem. I also found a solution, but I have not been able to solve my problem even after trying for many hours. The trouble is that I get no error message. The procedure simply runs for too long.

I use the following information in the procedure. All I want to know is, does this look correct? For privacy reasons, I am filling in some general values for the values I have been given to use such as

Server: smtp.xyz.com
Port: 111 or 222
Security: SSL on 111; STARTTLS/TLS on 222
Username: xyz@abc.com
Password: aaaa?1111

I am using them exactly as below, and the procedure gets created but does not seem to send mails.

c := utl_smtp.open_connection('smtp.xyz.com', '111');
utl_smtp.helo(c, 'xyz.com');
utl_smtp.command(c, 'AUTH LOGIN');
utl_smtp.command(c,utl_encode.base64_encode(utl_raw.cast_to_raw('SSL on 111')));
utl_smtp.command(c,utl_encode.base64_encode(utl_raw.cast_to_raw('xyz@abc.com')));
utl_smtp.command(c, utl_encode.base64_encode(utl_raw.cast_to_raw('aaaa?1111@abc.com')));

I have an additional question about the password. If the password has a question mark in it and if I use the escape character , then I guess the password would be accepted. For instance I am doing this: 'aaaa?1111@abc.com' When I see the email in text format, it seems to truncate everything before ? showing aaaa?1111@abc.com, hence the doubt.

View 1 Replies View Related

SQL & PL/SQL :: Mail Reading / Saving Through Package Or Procedure

Nov 14, 2011

sample code to read attachments in inbox(from POP3 mail server) using plsql package or procedure.

View 6 Replies View Related

When Executed Procedure SEND_MAIL / Recipient Is Not Receiving Mail

Jul 7, 2011

I created the following procedure in my local database.When I executed the procedure SEND_MAIL, recipient is not receiving mail.Do I need any setup in my database?

here is my procedure.
CREATE OR REPLACE PROCEDURE SEND_MAIL (
msg_to varchar2,
msg_subject varchar2,
msg_text varchar2 )
IS
c utl_smtp.connection;
rc integer;
msg_from varchar2(50) := 'Oracle11.2';
mailhost VARCHAR2(30) := '10.137.133.18'; -- local database host
[code]....

View 3 Replies View Related

SQL & PL/SQL :: Procedure For Sending Mail With Excel / Pdf Attachment Using Smtp?

Nov 24, 2010

send script to send mail with excel attachment using smtp from Oracle 9i

View 1 Replies View Related

SQL & PL/SQL :: Send Email From Procedure

Dec 9, 2010

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.

View 9 Replies View Related

Send Email With Attachment Using Stored Procedure?

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

PL/SQL :: Best Way To Send A Procedure / Function Output To The Application

Sep 8, 2013

What is the best way to send the output of a PL / SQL function / procedure to the application in Oracle 11g. I understand that it could be different for applications built in JAVA , .Net , SAP etc. 

View 49 Replies View Related

SQL & PL/SQL :: Procedure To Send Invoices To Customer Through Mails

Nov 3, 2010

i'm working on procedure to send invoices to customer thru mails.

i'm using UTL_Mail package to send html content in a mail , it's working if i'm using my company mail exchange BUT if i put "xxxx@hotmail.com" or "xxxx@yahoo.com" it doesn't work and raise

error :ORA-29279: SMTP permanent error: 550 5.7.1 Unable to relay for xxxxx@hotmail.com

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved