- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Notification mail failure in Oracle
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2006 04:18 PM
тАО02-26-2006 04:18 PM
When I try to send notification mail from Oracle using the below SQL procedure, I am getting the error "ORA-29278: SMTP transient error: 421 Service not available".
DECLARE
BEGIN
send_mail(NULL,'test',null,'/home/srini/test.dat',null,'sr_yella@yahoo.com.sr_yella@yahoo.com','sr_yella@yahoo.com','sr_yella@yahoo.com');
--SEND_MAIL ( A_CALL_NM_STR, A_SUBJECT_STR, A_FILE_TYPE_CHAR, A_FILE_NM_STR, A_MAIL_STDIN_STR, A_EM_ADDR_STR, A_CC_NAMES, A_BCC_NAMES );
COMMIT;
END;
ORA-20001: ORA-29278: SMTP transient error: 421 Service not available
ORA-06512: at "ECLIPSE.SEND_MAIL", line 40
ORA-29278: SMTP transient error: 421 Service not available
ORA-06512: at line 21
I have configured sendmail in Unix and able to send emails using sendmail at OS level.
Can anybody let me know what could be the possible reason?
Thanks in Advance.
Regards,
Srinivas.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2006 04:24 PM
тАО02-26-2006 04:24 PM
Re: Notification mail failure in Oracle
Check this url, http://forums.oracle.com/forums/message.jspa?messageID=630550
http://forums.oracle.com/forums/thread.jspa?messageID=1177838
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2006 04:38 PM
тАО02-26-2006 04:38 PM
Re: Notification mail failure in Oracle
ORA-29278: SMTP transient error: 421 Service not available. The cause for this would be that the mailhost cannot be contacted.
Check the mailhost specified in UTL_SMTP.OPEN_CONNECTION and UTL_SMTP.HELO.
IA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2006 04:52 PM
тАО02-26-2006 04:52 PM
Re: Notification mail failure in Oracle
the error means, that your host you are using is not running smtp services.
ask your SA's where there is an smtp server in your network that does relaying.
Also make sure that the address defined in your variable "l_mailhost" is running smtp on port 25.
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2006 05:03 PM
тАО02-26-2006 05:03 PM
Solutionone simple example that i usually use is:
create or replace
PROCEDURE send_mail (p_sender IN VARCHAR2,
p_recipient IN VARCHAR2,
p_message IN VARCHAR2)
as
-- Note that you have to use a host
-- that supports SMTP and that you have access to.
-- You do not have access to this host and must change it
l_mailhost VARCHAR2(255) := 'mysvr.co.mu';
l_mail_conn utl_smtp.connection;
BEGIN
l_mail_conn := utl_smtp.open_connection(l_mailhost, 25);
utl_smtp.helo(l_mail_conn, l_mailhost);
utl_smtp.mail(l_mail_conn, p_sender);
utl_smtp.rcpt(l_mail_conn, p_recipient);
utl_smtp.open_data(l_mail_conn );
utl_smtp.write_data(l_mail_conn, p_message);
utl_smtp.close_data(l_mail_conn );
utl_smtp.quit(l_mail_conn);
end;
/
set serveroutput on
declare
l_start number := dbms_utility.get_time;
begin
send_mail( 'yd@mysvr.com',
'helloworld@gmail.com', 'Hello world' );
dbms_output.put_line
( round( (dbms_utility.get_time-l_start)/100, 2 ) ||
' seconds' );
end;
/
Please make appropriate changes..
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2006 05:52 PM
тАО02-26-2006 05:52 PM
Re: Notification mail failure in Oracle
May be a simple query, but I am new to pl/sql procedures.
Can you please let me know how I can check the value assigned to mailhost or l_mailhost in SEND_MAIL procedure?
And how can I change that value?
Thanks & Regards,
Srinivas.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2006 05:59 PM
тАО02-26-2006 05:59 PM
Re: Notification mail failure in Oracle
Now,I just want to modify mailhost/l_mailhost in SEND_MAIL procedure.
Please let me know how I can do that.
Thanks & Regards,
Srinivas.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2006 08:59 PM
тАО02-26-2006 08:59 PM
Re: Notification mail failure in Oracle
you will need to open the SEND_MAIL and make the change.
one simple editor for your procedure which you can use is Oracle SQL Developer (formerly Project Raptor). Please download it from http://www.oracle.com/technology/products/database/project_raptor/index.html
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2006 08:54 AM
тАО02-28-2006 08:54 AM
Re: Notification mail failure in Oracle
Reloading should include initjvm.sql & initplsj.sql.
Then exec ultsmtp.sql and grant right to users.
Then check your sendmail procedure that I feel the syntax is not right. Check the sendmail prototype with syntax, which should be like "send_mail(├в registry@abcdefg.com├в ,├в en88@yahoo.com├в ,├в test├в ,├в test1├в );
HTH.
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2006 01:32 PM
тАО03-06-2006 01:32 PM
Re: Notification mail failure in Oracle
I downloaded sql developer and modified smtp host in UTL_SMTP_SEND_MAIL procedure.
Now I am able to send the mials.
Thanks a lot for your help.
Thanks & Regards,
Srinivas.