<

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

Send Email From Oracle Database

Posted on
5,759 Points
2,459 Views
3 Endorsements
Last Modified:
Experience Level: Beginner
5:08
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
3
Comment
Author:Steve Wales
7 Comments
LVL 80

Expert Comment

by:slightwv (䄆 Netminder)
For the UTL_MAIL section, make it OS generic (even the docs don't).

Instead of this for Windows:
@%ORACLE_HOME%/rdbms/admin/utlmail.sql
@%ORACLE_HOME%/rdbms/admin/prvtmail.plb

For UNIX flavors:
@$ORACLE_HOME/rdbms/admin/utlmail.sql
@$ORACLE_HOME/rdbms/admin/prvtmail.plb

Use the LONG forgotten sqlplus shortcut for ORACLE_HOME:
@?/rdbms/admin/utlmail.sql
@?/rdbms/admin/prvtmail.plb

Works across platforms and if used in scripts, no modifications necessary.
0
LVL 23

Author Comment

by:Steve Wales
An excellent point I hadn't even considered when making the video.  Thanks for the note!
0

Expert Comment

by:asif khan
Hi,
Sir, can we use smtp.gmail.com as a email server.

Regards,
0
LVL 23

Author Comment

by:Steve Wales
I see no reason why you can't - as long as you have an existing set up where you can use it, any valid email relay you have permissions to use should work
0

Expert Comment

by:asif khan
Thanks for the reply.

Regards.
0

Expert Comment

by:Anand Ghatnatti
I am getting error ORA-29279: SMTP permanent error: 504 auth type not available (#5.5.1) please help. I am using Oracle 11g R1
0
LVL 23

Author Comment

by:Steve Wales
This sort of thing is probably better directed as a separate question rather than a comment on the video (you'll hit a wider audience than just me (or anyone else who has commented on the video).

Most likely candidate in my mind is that your relay server isn't set up to accept incoming relay requests from your database server.  But, again, I'd post this as a separate question with more detail than just the error message you're getting.
0

Featured Post

Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Join & Write a Comment

An introductory discussion about Oracle Analytic Functions which are used to calculate or compute Aggregate values, based on a group of rows.
In this article, we will see how to use the RANK analytical function in an Oracle database and how it helps us in an analysis.

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month