Skip to Main Content
  • Questions
  • UTL_MAIL with AUTHENTICATION OF SENDER

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Omar.

Asked: January 11, 2019 - 10:04 am UTC

Last updated: August 28, 2020 - 1:09 am UTC

Version: 11g R2

Viewed 1000+ times

You Asked

i m trying to send an email with utl_mail using this procedure:

BEGIN
UTL_MAIL.send(sender     => 'o.adahanifi@teletic.dz',
                recipients => 'ao_ada_hanifi@esi.dz',
                subject    => 'UTL_MAIL Test',
                message    => 'If you get this message it worked!');
END;


but i have this error :

ORA-29279: erreur permanente SMTP : 550 authentication.


and before that i used utl_smtp to send emails and worked perfectly since it gives the option of authentication of sender.

so the question is there way to authenticate sender using utl_mail or just stay with utl_smtp.

and Connor said...

Yes, you'll need to go back to UTL_SMTP.

UTL_MAIL is like a "convenience shortcut" for the fuller functioned UTL_SMTP

Rating

  (2 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Omar Ada Hanifi, January 13, 2019 - 9:42 am UTC

thanks Tom
Connor McDonald
January 14, 2019 - 12:35 am UTC

glad we could help

UTL_SMTP

bc, August 27, 2020 - 1:42 pm UTC

Connor,

I am in the process of creating a notification procedure to send out emails ( Authenticated, of course ) , our current database version is 12c but we plan on moving up to 19c. Is UTL_SMTP supported in 19c ?

I just want to make sure what we build today can also be used in the next version or two.
Connor McDonald
August 28, 2020 - 1:09 am UTC

Yes. UTL_SMTP is there and there are no plans that I know of to remove it. I've seen it in 20c and 21c work-in-progress versions of the database as well.

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library