Problem in sending mails from PL/SQL procedure using utl_tcp
Posted on 2005-04-21
I am writing a stored procedure and inside the procedure after doing specific tasks I am notifying mails to the some mailds.
So I have a procedure named SendMail which will send the emails. I use my unix server name as my mail server and port 25 for sending mails. i am using utl_tcp method.
But I get the following error when I run the procedure.(assume xyz is the valid server and tom is a valid mail id)
SQL> exec send_mail('firstname.lastname@example.org','email@example.com','hi test','mail from db');
BEGIN send_mail('firstname.lastname@example.org','email@example.com','hi test','mail from db');
ERROR at line 1:
ORA-20000: Unable to send e-mail message from pl/sql because of: ORA-29260:
network error: TNS:no listener
ORA-06512: at "INV.SEND_MAIL", line 40
ORA-06512: at line 1
Pls tell me what could be the problem? Do we need to specify anything in the initora file for mailing option? or is there anything wrong in using the server or port?
IF YOU HAVE ANY SAMPLE WORKING CODE PLS REPLY/COPY ME THE SAME.
pls treat this as urgent. Anyother solution is also welcome.