If you want to use the features of the UTL_TCP package you need to publish it to your APEX application user. (I tested it under APEX 3.1.2)
How to:
-- sqlplus
GRANT EXECUTE ON "SYS"."UTL_TCP" TO "APEX_USER"
-- sqlplus
create or replace synonym UTL_TCP for SYS.UTL_TCP;
-- an APEX process procedur
-- apex_mail procedure call
apex_mail.send(
p_to => 'user@company.com',
p_from => 'info@company.com',
p_body => 'New message cerated from ' || :p1_user || '.' || utl_tcp.crlf ||
'Description: ' || utl_tcp.crlf || :p1_description,
p_subj => 'New message! ' utl_tcp.crlf);
-- push the e-mail queue for immediate delivery
wwv_flow_mail.push_queue(
P_SMTP_HOSTNAME => 'ip',
P_SMTP_PORTNO => 'port');
Update (08.09.2009):
There was a interesting question about the APEX_MAIL function and pushing the email queue in the Oracle forum which you may be interested on: apex mail - mail queue
APEX training
APEX example apps
Blogs about APEX/ExtJS
-
-
-
New book on APEX coming soon!2 months ago
Apps around the Oracle DB
JS compress/decompress
Blog aggregators
Labels
- APEX examples (30)
- Browser issues (4)
- Data mapping (1)
- DBMS_SCHEDULER (1)
- Development tools (3)
- EXTJS (8)
- Linux (1)
- ORA- (4)
- Personal stuff (5)
- RMAN (1)
- TREE (4)
24 September, 2008
APEX_MAIL with UTL_TCP under XE database
Post from
Tobias Arnhold
.
24 September, 2008
Subscribe to:
Post Comments (Atom)
About Me
- Tobias Arnhold
- Dresden, Saxony, Germany
- I'm database administrator for Oracle 10g databases and develop applications in Oracle Application Express and Oracle Forms&Reports. In the time when I started working with Oracle products somewhere in 2005. I came along with Oracle APEX 1.6 and since then I started developing professional applications with it. The biggest success I had with APEX was the second place at the ORACLE-APEX-AWARD 2008. I made my eduction in Germany, Dresden as an IT specialist 2005 and 2009 I enhanced it to a professional studies for informatics. All I express are my own views on APEX and other third party software and it doesn't have necessarily to do with the views of other companies or persons.

3 Comments:
Tobias, thanks a lot, that is a good explanation, a few words more for beginners as me...
To connect as sysdba to allow this grant use a sentence like
CONNECT / as sysdba
in SQL plus
Rodrigo Rojas Moraleda
Hi Rodrigo,
thanks for your reply.
I try to explain more detailed next time.
Tobias
Thanks for the help !! Why on earth was this not done (from Oracle) under the installation of Oracle XE 10g ?
Makes no sensence to have it but not see it ?!?
Cheers from Denmark
Jesper - DBA & Dev on Oracle v5-11
Post a Comment