When trying to send an e-mail with the UTL_MAIL package, the error “ORA-06502: PL / SQL: numeric or value error” is received when the smtp_out_server start parameter is not set even though there is no problem in its parameters or parameter values.
The error received will be as follows.
1 2 3 4 5 6 7 8 9 |
SQL> BEGIN UTL_MAIL.SEND('[email protected]','[email protected]' ,NULL,NULL,'Database export 20200220 ','20.02.2020' , 'text/html; charset=us-ascii',NULL); END; * ERROR at line 1: ORA-06502: PL/SQL: numeric or value error ORA-06512: at "SYS.UTL_MAIL", line 654 ORA-06512: at "SYS.UTL_MAIL", line 441 ORA-06512: at "SYS.UTL_MAIL", line 671 ORA-06512: at line 1 |
The smtp_out_server parameter should be set to solve the problem. It can be set as follows.
1 2 3 |
SQL> alter system set smtp_out_server='192.168.20.10' scope=both sid='*'; System altered. |
Then, the problem will be solved.