Home » SQL & PL/SQL » SQL & PL/SQL » E-mail through Pl/SQL
E-mail through Pl/SQL [message #188703] Mon, 21 August 2006 04:45 Go to next message
Messages: 123
Registered: July 2005
Senior Member
Dear all
Pl find below a procedure i wrote to send a email through Pl/Sql

create or replace procedure send_emsg
mailhost varchar2(64) := '';
sender varchar2(64) := 'umesh@honda.com.kw';
rcpt varchar2(64) := 'sarfraz_it@honda.com.kw';
m_cnt utl_smtp.connection;
m_cnt := utl_smtp.open_connection(host => mailhost
,port => 25);
utl_smtp.helo(m_cnt, mailhost);
utl_smtp.mail(m_cnt, sender);
utl_smtp.rcpt(m_cnt, rcpt);
utl_smtp.write_data(m_cnt, utl_tcp.CRLF || 'Hello, world!');
utl_smtp.write_data(m_cnt, utl_tcp.CRLF || 'Hello, world!');

Procedure created and running successfully but the receipent is not receiving the mail
can anyone help me


Re: E-mail through Pl/SQL [message #188726 is a reply to message #188703] Mon, 21 August 2006 05:46 Go to previous messageGo to next message
Frank Naude
Messages: 4509
Registered: April 1998
Senior Member
Do a "telnet 25" to see if you have a mail server running at this address/port. Try to enter the SMTP commands manually to see where it fails.
Re: E-mail through Pl/SQL [message #223108 is a reply to message #188726] Wed, 07 March 2007 10:10 Go to previous message
Messages: 33
Registered: February 2007
Location: kolkata
dear sir
i tried this code with proper ip and port number but still didn't receive mail.
pls help me
Previous Topic: purity level of finction
Next Topic: pls help utl_smtp package
Goto Forum:

Current Time: Sat Jul 22 06:13:43 CDT 2017

Total time taken to generate the page: 0.29931 seconds