UTL_SMTP : 421 Service not available ? 
Author Message
 UTL_SMTP : 421 Service not available ?

Hi everybody,

I tried to send mail from stored procedure (V8.1.6), using the example on
www.kbaseonline.com.

I tried to send a mail using an internal mail server, it worked fine. The
mail server is on the same network than my computer. The recipient was
myself (internal to internal !).

I tried to send a mail using our provider, it doesn't work, sending message
:

ORA-20001: 421 Service not available
ORA-06512: at "SYS.UTL_SMTP", line 83
ORA-06512: at "SYS.UTL_SMTP", line 344

I pinged the SMTP server of my provider, it works fine.

Any ideas ?

Thanks.

Yann



Sat, 22 May 2004 16:31:47 GMT
 UTL_SMTP : 421 Service not available ?

Quote:
> I tried to send a mail using our provider, it doesn't work, sending
message
> :

> ORA-20001: 421 Service not available
> ORA-06512: at "SYS.UTL_SMTP", line 83
> ORA-06512: at "SYS.UTL_SMTP", line 344

Just try to get the messages from the mail server of your provider by
calling the utl_smtp commands like this:

declare
    mail_conn utl_smtp.connection;
    return_message utl_smtp.reply;
    .
    .

begin
    return_message := utl_smtp.open_connection('mailhost', 25, mail_conn);
    message(return_message);
    return_message := utl_smtp.helo(mail_conn, 'mailhost');
    message(return_message);
    .
    .
end;

This will give you more information when and probably why it doesn't work.

So long,

Jan



Sat, 22 May 2004 17:47:08 GMT
 UTL_SMTP : 421 Service not available ?
Hi,

I tried what you kindly suggested, but the return message is always the same
:
'service not available'.

I checked again the parameters of my mail account in Outlook express, I
think if got the right parameters. here's what i tried, may be you'll see
something wrong...

SQL> declare
  2      mail_conn utl_smtp.connection;
  3      return_message utl_smtp.reply;
  4  begin
  5  return_message := utl_smtp.open_connection('195.3.3.6',25,mail_conn);
  6  dbms_output.put_line(return_message.text);
  7  return_message := utl_smtp.helo(mail_conn, '195.3.3.6');
  8  dbms_output.put_line(return_message.text);
  9  end;
 10  /
Service not available
Service not available

PL/SQL procedure successfully completed.

Thanks.

Yann


Quote:
>> I tried to send a mail using our provider, it doesn't work, sending
>message
>> :

>> ORA-20001: 421 Service not available
>> ORA-06512: at "SYS.UTL_SMTP", line 83
>> ORA-06512: at "SYS.UTL_SMTP", line 344

>Just try to get the messages from the mail server of your provider by
>calling the utl_smtp commands like this:

>declare
>    mail_conn utl_smtp.connection;
>    return_message utl_smtp.reply;
>    .
>    .

>begin
>    return_message := utl_smtp.open_connection('mailhost', 25, mail_conn);
>    message(return_message);
>    return_message := utl_smtp.helo(mail_conn, 'mailhost');
>    message(return_message);
>    .
>    .
>end;

>This will give you more information when and probably why it doesn't work.

>So long,

>Jan



Sun, 23 May 2004 16:14:13 GMT
 UTL_SMTP : 421 Service not available ?


Quote:
> I checked again the parameters of my mail account in Outlook express, I
> think if got the right parameters. here's what i tried, may be you'll see
> something wrong...

No it's look o.k. for me.

I'm not sure but maybe you're behind a firewall and the database is not
allowed to talk at Port 25 with the world...

So long,

Jan



Sun, 23 May 2004 16:42:13 GMT
 UTL_SMTP : 421 Service not available ?
Will check this with the right person...


Quote:


>> I checked again the parameters of my mail account in Outlook express, I
>> think if got the right parameters. here's what i tried, may be you'll see
>> something wrong...

>No it's look o.k. for me.

>I'm not sure but maybe you're behind a firewall and the database is not
>allowed to talk at Port 25 with the world...

>So long,

>Jan



Sun, 23 May 2004 16:50:26 GMT
 UTL_SMTP : 421 Service not available ?
I tried to send a mail using telnet, and the same commands than used with
oracle (helo,...), it works fine.
I wonder if there is not something to activate into Oracle to send mails.
May be the message 'Service not available' is sent by Oracle and not by the
provider ?

Yann


Quote:


>> I checked again the parameters of my mail account in Outlook express, I
>> think if got the right parameters. here's what i tried, may be you'll see
>> something wrong...

>No it's look o.k. for me.

>I'm not sure but maybe you're behind a firewall and the database is not
>allowed to talk at Port 25 with the world...

>So long,

>Jan



Sun, 23 May 2004 17:24:37 GMT
 UTL_SMTP : 421 Service not available ?


Quote:
> I tried to send a mail using telnet, and the same commands than used with
> oracle (helo,...), it works fine.

I assume that you've done this from your workstation. So the firewall will
let you do this either you use the command line or other tools. But the
e-mails from the database are sent from the database sever. If there is a
deny-rule on the firewall for port 25 for the database server no mailing
will be possible...

Quote:
> I wonder if there is not something to activate into Oracle to send mails.
> May be the message 'Service not available' is sent by Oracle and not by
the
> provider ?

But you've sent mail internally. So it works in principle.

Hope that helps...

Jan



Sun, 23 May 2004 17:37:09 GMT
 UTL_SMTP : 421 Service not available ?
You were right, the mail is sent from the server, and the server was not
able to connect to the router.
This point has been cleared, and now it's OK.

Many thanks for your help.

Yann


Quote:


>> I tried to send a mail using telnet, and the same commands than used with
>> oracle (helo,...), it works fine.

>I assume that you've done this from your workstation. So the firewall will
>let you do this either you use the command line or other tools. But the
>e-mails from the database are sent from the database sever. If there is a
>deny-rule on the firewall for port 25 for the database server no mailing
>will be possible...

>> I wonder if there is not something to activate into Oracle to send mails.
>> May be the message 'Service not available' is sent by Oracle and not by
>the
>> provider ?

>But you've sent mail internally. So it works in principle.

>Hope that helps...

>Jan



Sun, 23 May 2004 17:57:44 GMT
 UTL_SMTP : 421 Service not available ?
Just one slight suggestion:

when you issue utl_smtp.helo(), you should generally specify the IP or
domain name of the host that connects to the server, not that of the
SMTP server itself or just some fake string. Some servers do validation
of HELO parameters and deny access if domain name and/or IP address
specified by the sender do not match actual values the server got when
it accepted the connection (this is done to prevent spam through the
server).

PSP_Mail, our Oracle8i emailing solution built around UTL_SMTP, allows
you to avoid this and many other issues with the many different versions
of SMTP servers out there, plus it allows to send e-mails with LOB
attachments, can detect recipient's email server and send directly to it,
provides NLS support for both message body and headers allowing you
to send e-mails in your native language which are fully conformant to
MIME standard, and more.

You can try it out for free by downloading an evaluation copy from
http://www.dpsp-yes.com, and it's fairly priced if you decide it is of
help to you.

--

Dynamic PSP(tm) - the first true RAD toolkit for Oracle-based internet applications.
All opinions are mine and do not necessarily go in line with those of my employer.


Quote:
> You were right, the mail is sent from the server, and the server was not
> able to connect to the router.
> This point has been cleared, and now it's OK.

> Many thanks for your help.

> Yann




> >> I tried to send a mail using telnet, and the same commands than used with
> >> oracle (helo,...), it works fine.

> >I assume that you've done this from your workstation. So the firewall will
> >let you do this either you use the command line or other tools. But the
> >e-mails from the database are sent from the database sever. If there is a
> >deny-rule on the firewall for port 25 for the database server no mailing
> >will be possible...

> >> I wonder if there is not something to activate into Oracle to send mails.
> >> May be the message 'Service not available' is sent by Oracle and not by
> >the
> >> provider ?

> >But you've sent mail internally. So it works in principle.

> >Hope that helps...

> >Jan



Mon, 24 May 2004 00:04:38 GMT
 
 [ 9 post ] 

 Relevant Pages 

1. Confirmation on SQL Server error 421

2. MS SQL 421, Dumps, Tape Drives, Benchmarks

3. Analysis Services Drill through - NOT available??

4. MSDTC Service Not Available?????

5. ora-12663 Services req'd by client not available on Server

6. ORA-12663: Services required by client not available on the server

7. ORA-12663: Services not available on the server / BDE

8. On desc : ORA-12663: Services required by client not available on the server

9. Analysis service will not run as a service

10. Error 1060 - The specified service does not exist as an installed service

11. SQL 7.0 Service Manager error 1069 - (The service did not start due to a logon failure

12. OEM not working, Service not start!!


 
Powered by phpBB® Forum Software