Home » SQL & PL/SQL » SQL & PL/SQL » to send a mail from oracle using MS Outlook... getting error ORA-29279
to send a mail from oracle using MS Outlook... getting error ORA-29279 [message #138443] Thu, 22 September 2005 01:13 Go to next message
rishi_mahajan
Messages: 9
Registered: August 2005
Junior Member
Hello everybody

I want to send an e-mail from oracle 10g using MS outlook professional edition 2003
i am getting this error
ORA-29279: SMTP permanent error: 503 5.0.0 Need MAIL command

Can u plz me to refine this code

this is my code


declare
c UTL_SMTP.connection;
begin
dbms_output.put_line('opening connection');
c := UTL_SMTP.OPEN_CONNECTION ('localhost');
UTL_SMTP.HELO (c, 'youre.domain.name.com');
UTL_SMTP.MAIL (c, 'tc02237@emirates.com', NULL);
UTL_SMTP.RCPT (c, 'tC02168@emirates.com', NULL);
UTL_SMTP.DATA (c, 'SUBJECT: Hello ');
UTL_SMTP.DATA (c, 'this is a test mail');
UTL_SMTP.QUIT (c);
exception
when others then
dbms_output.put_line(sqlerrm);
end;
Re: to send a mail from oracle using MS Outlook... getting error ORA-29279 [message #138554 is a reply to message #138443] Thu, 22 September 2005 08:34 Go to previous messageGo to next message
Art Metzer
Messages: 2480
Registered: December 2002
Senior Member
Your error is an SMTP error, not an Oracle error per se.

Try switching the order of your UTL_SMTP.MAIL and your UTL_SMTP.RCPT lines.

If that doesn't work, see if these other links help you.
Re: to send a mail from oracle using MS Outlook... getting error ORA-29279 [message #138811 is a reply to message #138554] Sat, 24 September 2005 00:36 Go to previous messageGo to next message
rishi_mahajan
Messages: 9
Registered: August 2005
Junior Member
i am getting this error -
550 Relaying is prohibited.... what should i do
Re: to send a mail from oracle using MS Outlook... getting error ORA-29279 [message #138816 is a reply to message #138811] Sat, 24 September 2005 01:22 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
Google for that message. It is an smtp-problem, not an Oracle problem. Seems like your Oracle-code works fine, but you are using the wrong mail-addresses according to your mail-server.

hth
Re: to send a mail from oracle using MS Outlook... getting error ORA-29279 [message #138835 is a reply to message #138816] Sat, 24 September 2005 05:31 Go to previous messageGo to next message
santhoshmp
Messages: 11
Registered: July 2005
Junior Member
From google for SMTP error 550:

ERROR MESSAGE
Error 550 Relaying not allowed

RESOLUTION
This error message is coming from the mail server, not from Outlook Express. This error means that the SMTP (outgoing) mail server did not recognize you as an authorized user and rejected your e-mail message. Most ISPs (ISP stands for Internet Service Provider, and this includes GCI) configure their mail servers to recognize only those computer IP addresses that are on an accepted list. If you use multiple ISPs, or just switched from another ISP, you are likely to encounter this problem. The solution is to change setting of the SMTP server for that mail account under your e-mail application:

For Microsoft Outlook Express:

From the Inbox
Click on from Tools from the menu bar
Click on Accounts
Click on Properties
Click on Servers
Change the SMTP (outgoing mail) to : smtp.gci.net.
For Netscape versions 4.X you will:

Click on Edit from the menu bar-
Click on Preferences
Click the + sign next to mail/newsgroups
Then click Mail Servers-verify the Outgoing Mail Server name is : smtp.gci.net.
For Netscape versions 6.X you will:

Click Tasks
Then Mail
This will launch the mail program-
Then click on Edit
Then Mail/News account settings-
Verify your Outgoing Mail Server is: smtp.gci.net.
In all cases, make sure the words smtp.gci.net are lower case.

Thanks
Santhosh.
Re: to send a mail from oracle using MS Outlook... getting error ORA-29279 [message #138877 is a reply to message #138443] Sat, 24 September 2005 17:17 Go to previous messageGo to next message
William Robertson
Messages: 1643
Registered: August 2003
Location: London, UK
Senior Member
I don't see where MS Outlook comes into the picture. UTL_SMTP sends mail via an SMTP server.
Re: to send a mail from oracle using MS Outlook... getting error ORA-29279 [message #138883 is a reply to message #138877] Sat, 24 September 2005 22:02 Go to previous messageGo to next message
santhoshmp
Messages: 11
Registered: July 2005
Junior Member
Hi robertson,

If we check for the error message ORA-29279 in ora doc, it says that the error is due to an SMTP error. In this case it is 550.

The solution is to change setting of the SMTP server for that mail account under our e-mail application. To change this we need an email client which can be outlook express or netscape.

If we are using Outlook express as our mail client we can reset the SMTP setting as per the instructions given. the same is given for netscape also.

Thanks
Santhosh.
Re: to send a mail from oracle using MS Outlook... getting error ORA-29279 [message #138905 is a reply to message #138883] Sun, 25 September 2005 07:59 Go to previous messageGo to next message
William Robertson
Messages: 1643
Registered: August 2003
Location: London, UK
Senior Member
With UTL_SMTP, the database server is connecting directly to the SMTP server. Unless I'm missing something, your choice of client application has nothing to do with the settings of the SMTP server, and cannot alter them.
Re: to send a mail from oracle using MS Outlook... getting error ORA-29279 [message #138939 is a reply to message #138905] Sun, 25 September 2005 22:46 Go to previous messageGo to next message
santhoshmp
Messages: 11
Registered: July 2005
Junior Member
Yes robertosn you are correct, we cannot change the settings of the SMTP server from the client. The resolution given in the previous mail will only fix the issue if the issue happens from that mail client( For eg : Outlook express ).

The resolution for this issue is related to the SMTP server used. If we search in the google with this SMTP error 550 and the server used, we will get the fix required.

Thanks
Santhosh.
Re: to send a mail from oracle using MS Outlook... getting error ORA-29279 [message #138940 is a reply to message #138939] Sun, 25 September 2005 22:51 Go to previous messageGo to next message
rishi_mahajan
Messages: 9
Registered: August 2005
Junior Member
Dear santhosh/William/Frank/Metzer,

Thanks a million for your help....

I had to hold on with this module as the for some other reasons... i will definitely come back to u guys as soon i resume the e-mail module.....

thanks once again... u comments helped me a lot..

Regards,
Rishi.
Re: to send a mail from oracle using MS Outlook... getting error ORA-29279 [message #138979 is a reply to message #138940] Mon, 26 September 2005 02:43 Go to previous messageGo to next message
William Robertson
Messages: 1643
Registered: August 2003
Location: London, UK
Senior Member
There is an example of a SEND_MAIL procedure here. Note that you will need to substitute your own SMTP server unless it happens to be smtp.bluehonder.co.uk.
Re: to send a mail from oracle using MS Outlook... getting error ORA-29279 [message #140236 is a reply to message #138443] Mon, 03 October 2005 01:09 Go to previous message
weyd_ii
Messages: 5
Registered: October 2005
Location: Russia
Junior Member
Hello everybody!

I think there are a lot of possible problems may appear when using the UTL_SMTP package in different ways.
Could anybody tell me whether the error message "ORA-29279: 572 a domain name must be specified" has ever been seen and corrected.
The following message appears when I call

c:=utl_smtp.open_connection('w.x.y.z',25);

where w.x.y.z is a correct static IP-address used in my organization which is working when used in Outlook Express, telnet and other programs, but isn't working in Oracle!
When I pass to this function a not existing domain the error message is "421 Service not available", but if in my occasion the message is different then the domain exists! But what's wrong? Could anybody tell me?
I haven't seen an answer to my question anywhere! This error message isn't documented at all!
Previous Topic: SELECT STATEMENT
Next Topic: need help with dbms_job
Goto Forum:
  


Current Time: Thu Apr 25 15:40:56 CDT 2024