------------------------
Operational Notes
You must both install UTL_MAIL and define the SMTP_OUT_SERVER.
To install UTL_MAIL:
sqlplus sys/
SQL> @$ORACLE_HOME/rdbms/admin/utlmail.sql
SQL> @$ORACLE_HOME/rdbms/admin/prvtmail.sql
You define the SMTP_OUT_SERVER parameter in the init.ora rdbms initialization file. However, if SMTP_OUT_SERVER is not defined, this invokes a default of DB_DOMAIN which is guaranteed to be defined to perform appropriately.
--------------------------
I successfully ran and installed utlmail.sql, but the issue is I don't see prvtmail.sql file exist but only prvtmail.plb. So how do I run SQL> @$ORACLE_HOME/rdbms/admin/prvtmail.sql
to install SMTP_OUT_SERVER.
I am still unable to send emails using the package
Earlier the error on using
begin
-- Call the procedure
utl_mail.send('user@company.com','user@company.com');
end;
was
---------
error Message: ORA-20001: Failed to send mail due to the following error: ORA-29261: bad argument
ORA-20001: Failed to send mail due to the following error: ORA-29261: bad argument
---------
the message I am getting is
--------
Failed to send mail due to the following error: ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-20001: Failed to send mail due to the following error: ORA-06502: PL/SQL: numeric or value error: character to number conversion error
--------
Send procedure takes following parameters out of which only the first 2 are required - precipients & pcc
Bookmarks