In 7.3, the solutions are limited. There are at least 3 I can think of right away (and have used all 3 at various points). By far, the easiest method is:
1) use a stored procedure to write an OS file. This OS file is the email. have a cron job run every N minutes to "push" the queue (deliver any files that appear in this directory and then get rid of them).
2) more complex but more 'immediate'. If you set up a cgi-bin script that can do an email on the OAS side -- such that if you had a form:
<form action=do_mail>
<input type=text name=to>
<input type=text name=subj>
<input type=text name=body>
<input type=submit>
</form>
it would work (and it would send "mail" to TO with a subject SUBJ and a body of BODY). You could write this cgi-bin in perl, shell, C, anything you wanted.
Now, you could write a stored procedure that executed:
resp := utl_http.request( '</code>
HTTP://hostname/cgi-bin/do_mail?to=tkyte%40us.oracle.com&subj=Hi%20There&body=How%20are%20you%3F' );
That would send the email for you by running the cgi-bin script.
Here is a small URLENCODE routine you can use to get all of the right escape characters for a URL:
create or replace function urlencode( p_str in varchar2 ) return varchar2
as
l_tmp varchar2(6000);
l_len number default length(p_str);
l_hex varchar2(16) default '0123456789ABCDEF';
l_num number;
l_bad varchar2(100) default ' >%}\~];?@&<#{|^[`/:=$+''"' || chr(10);
l_char char(1);
begin
if ( p_str is NULL ) then
return NULL;
end if;
for i in 1 .. length(p_str) loop
l_char := substr(p_str,i,1);
if ( instr( l_bad, l_char ) > 0 )
then
l_num := ascii( l_char );
l_tmp := l_tmp || '%' ||
substr(l_hex, mod(trunc(l_num/16),16)+1, 1 ) ||
substr(l_hex, mod(l_num, 16)+1, 1 );
else
l_tmp := l_tmp || l_char;
end if;
end loop;
return l_tmp;
end;
/
3) use database pipes to create a "pipe" daemon in C that can send mail as well. See
http://asktom.oracle.com/~tkyte/plex/index.html <code>
for more info on that concept.