Hi,
why shouldn't you execute the SQL through a stored procedure? The database frontend application languages I know all have means to invoke a stored procedure through the regular database connection and this way the authentication is performed by establishing the connection with the application.
I'm only familiar with Informix stored procedures but they are capable of dynamicly building strings and run OS commands in SPL and I can't imagine Oracle doesn't provide a similar functionality. If necessary it even can be done in Java stored procedures.
So my way of handling this problem would be creating a stored procedure which performes the SQL statement, putting the results in a string and finally run the UNIX mail command with the string as parameter.
Another approach could be using the script as it is but invoked by a stored procedure. Because the executer of the shell script is an authenticated (at application logon), privileged user of the database the Informix database server is not concerned with authentication anymore when the SQL in the shell script is performed.
Regards.