Problem sending mail from APEX...
630622May 29 2008 — edited Apr 28 2009Hi everybody,
I've looking for how to send email from my APEX application; I've been reading the forum and I've done a testing using the APEX_MAIL.send procedure. I don't know exactly how the APEX_MAIL works but it seems that my code should work. Unfortunately, it doesn't work... I should receive emails but I don't receive any of them.
DECLARE
l_body CLOB;
BEGIN
l_body := 'Thank you for your interest in the HTMLDB_MAIL package.'||utl_tcp.crlf||utl_tcp.crlf;
l_body := l_body ||' Sincerely,'||utl_tcp.crlf;
l_body := l_body ||' The HTMLDB Dev Team'||utl_tcp.crlf;
APEX_MAIL.send(
p_to => 'myadress@gmail.com', -- change to your email address
p_from => 'myadress@gmail.com', -- change to a real senders email address
p_body => l_body,
p_subj => 'HTMLDB_MAIL Package - Plain Text message');
wwv_flow_mail.push_queue(
P_SMTP_HOSTNAME => 'localhost',
P_SMTP_PORTNO => '25'
);
EXCEPTION WHEN OTHERS THEN htp.p('Error');
END;
I execute it and there is no exception; it appears the "Procedure executed" message, but I don't receive the emails.
Maybe I am doing wrong the push_queue process? Maybe the Hostname is wrong? Should I do something else in APEX to send the mails?
Thank you very very much
Message was edited by:
sergicloser