Wednesday, June 20, 2007

UTL_MAIL package gives ORA-29261: bad argument

One of the developers sent this error while using UTL_MAIL package.

ORA-29261: bad argument
ORA-06512: at "SYS.UTL_TCP", line 28
ORA-06512: at "SYS.UTL_TCP", line 257
ORA-06512: at "SYS.UTL_SMTP", line 116
ORA-06512: at "SYS.UTL_SMTP", line 139
ORA-06512: at "SYS.UTL_MAIL", line 395
ORA-06512: at "SYS.UTL_MAIL", line 602
ORA-06512: at line 3

I found metalink note 339445.1 which says this can be due to two reasons.

1. SMTP_OUT_SERVER is not set as a database parameter.
2. This error can also occur if the SUBJECT parameter in the UTL_MAIL call is omitted.

In our case it was the first "SMTP_OUT_SERVER".

Added the parameter to the initialization parameter file and bounced the database.

1 comment:

Syed said...

Help full, Thumbs-up.
Regards,
Syed Khawar