send email from oracle

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

send email from oracle

Arsalan

Hi sir ,

i want to send email from oracle to gmail i face bellow error.

Created procedure in oracle after call it to send email it give use error.


-ORACLE 12.1 db
-Oracle linux os
show parameter smtp

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
smtp_out_server                      string      170.1.1.1


exec utl_mail.send('gmail.com','arsaladin1khan@gmail.com','test mail','Hello World',mime_type => 'text; charset=us-ascii');SQL> SQL>
BEGIN utl_mail.send('gmail.com','arsaladin1khan@gmail.com','test mail','Hello World',mime_type => 'text; charset=us-ascii'); END;

*
ERROR at line 1:
ORA-29278: SMTP transient error: 421 Service not available
ORA-06512: at "SYS.UTL_MAIL", line 662
ORA-06512: at "SYS.UTL_MAIL", line 679
ORA-06512: at line 1

Reply | Threaded
Open this post in threaded view
|

Re: send email from oracle

ErmanArslansOracleBlog
Administrator
Please check -> "How to Use the UTL_MAIL Package (Doc ID 269375.1)" -- and ensure you are using the package correctly.

Also check -> "Check SMTP Server Availability for ORA-29278 or ORA-29279 errors using UTL_SMTP to Send Email. (Doc ID 604763.1)" for diagnosing the issue.