Home » SQL & PL/SQL » SQL & PL/SQL » ORA-29278: SMTP transient error: 421 Service not available
ORA-29278: SMTP transient error: 421 Service not available [message #224099] Tue, 13 March 2007 01:47 Go to next message
donind
Messages: 95
Registered: February 2007
Member
when I am trying to execute below procedure its giving the following error.

ORA-29278: SMTP transient error: 421 Service not available


create or replace procedure email IS
mailhost VARCHAR2(64) := 'mail.google.com';
sender VARCHAR2(64) := 'chandrasekhar.g20@gmail.com';
recipient VARCHAR2(164) := 'samule40@gmail.com';
mail_conn utl_smtp.connection;
BEGIN
mail_conn := utl_smtp.open_connection(mailhost, 25);
utl_smtp.helo(mail_conn, mailhost);
utl_smtp.mail(mail_conn, sender);
utl_smtp.rcpt(mail_conn, recipient);
-- If we had the message in a single string, we could collapse
-- open_data(), write_data(), and close_data() into a single call to data().
utl_smtp.open_data(mail_conn);
utl_smtp.write_data(mail_conn, 'This is a test message.' || chr(13));
utl_smtp.write_data(mail_conn, 'This is line 2.' || chr(13));
utl_smtp.close_data(mail_conn);
utl_smtp.quit(mail_conn);
dbms_output.put_line('Successfully sends......');
EXCEPTION
WHEN OTHERS THEN
-- Insert error-handling code here
dbms_output.put_line(sqlerrm);
END;

could you pls help in solving this
Re: ORA-29278: SMTP transient error: 421 Service not available [message #224253 is a reply to message #224099] Tue, 13 March 2007 09:38 Go to previous messageGo to next message
Ronald Beck
Messages: 121
Registered: February 2003
Senior Member
Read your error message. Note that it says "...Service not available". This means that mail.google.com does not have SMTP service.

Normally, a site like mail.google.com is for you to download your mail from, i.e. a POP3 mail server. You need an SMTP mail server to send mail (SMTP = Simple Mail Transport Protocol). I'd be willing to bet if you changed "mail.google.com" to "smtp.google.com", your procedure might work. That is if your firewall lets you send out to smtp.google.com.

HTH,
Ron
Re: ORA-29278: SMTP transient error: 421 Service not available [message #224255 is a reply to message #224253] Tue, 13 March 2007 09:41 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
And assuming that Google are willing to act as a SMTP provider for any Tom, Dick or Harry who comes along.
Give how long it would take spammers to start exploiting that, I think it's a little on the unlikely side.
Re: ORA-29278: SMTP transient error: 421 Service not available [message #224256 is a reply to message #224255] Tue, 13 March 2007 09:48 Go to previous message
Ronald Beck
Messages: 121
Registered: February 2003
Senior Member
Easy enough to check...

telnet smtp.google.com 25

... wait for reply...

HELO <your IP domain>

... wait for reply...

QUIT


If it talks to you, it'll probably accept mail info from you. Try it and see!
Previous Topic: raise_APPILICATION_ERROR
Next Topic: dbms_output.put_line
Goto Forum:
  


Current Time: Wed Dec 07 04:58:40 CST 2016

Total time taken to generate the page: 0.10731 seconds