Skip to content

`Command_SYS.Mail` fails when called from PL/SQL with plain text parameters (from_user_name_, to_user_name_, text_, attach_, subject_), even though sending mail from the Events tab UI works fine with the same underlying mail server settings. What's wrong with the PL/SQL call?

Answer

There are two different overloads of Command_SYS.Mail, and the one being called (with from_user_name_/to_user_name_/attach_ parameters) expects its attach_ parameter to reference an actual attachment table, not a plain text string — passing text into that parameter is what's failing. Use the other overload instead, the one with sender_, from_, to_list_, cc_list_, bcc_list_, subject_, text_, attach_, rowkey_, and mail_sender_ parameters, passing empty strings for attach_ and rowkey_ when there's no actual attachment — this overload is designed for sending a plain text email and will work correctly where the other one doesn't.

← Browse Developer Studio, deployment, and upgrades questions