Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> problem in procedure to send email via plsql procedure

problem in procedure to send email via plsql procedure

From: ganesh bora <lalitmohanpadey_at_gmail.com>
Date: 23 Jan 2007 05:31:15 -0800
Message-ID: <1169559075.450564.3950@d71g2000cwa.googlegroups.com>


Hi all I wrote a procedure to send email via plsql procedure, It was compiled sucessfully but not working ....

here is the code (actuly i added the dbms output like step1 ,step 2 to see in which step the control is going on )

create or replace PROCEDURE send_test_message IS
mailhost VARCHAR2(64) := 'gmail.com';
sender VARCHAR2(64) := 'avc_at_gmail.com';
recipient VARCHAR2(64) := 'djdjjdd_at_gmail.com'; mail_conn utl_smtp.connection;
BEGIN

dbms_output.put_line('Step:1');
mail_conn := utl_smtp.open_connection(mailhost, 25);
dbms_output.put_line('Step:2');

utl_smtp.helo(mail_conn, mailhost);
dbms_output.put_line('Step:3');
utl_smtp.mail(mail_conn, sender);
dbms_output.put_line('Step:4');
utl_smtp.rcpt(mail_conn, recipient);
dbms_output.put_line('Step:5');
-- If we had the message in a single string, we could collapse

SQL> exec send_test_message

Step:1
Step:2
Step:3
Step:4

not executed i m in exeption

plz give sum advise what i m doing wrong

thanks Received on Tue Jan 23 2007 - 07:31:15 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US