Sending Email through Oracle Forms 6i [message #87844] |
Wed, 16 February 2005 09:40  |
Jay
Messages: 127 Registered: October 1999
|
Senior Member |
|
|
Hello. I have a problem that I cannot seem to solve.
The requirements of a form are that when a button to commit records is selected, an email must be sent (in the background, without opening Outlook or opening another Canvas) to a recipient detailing some on the information presented from that form.
I've searched through the forums for some help, however, the topics I have read are either not exactly what I'm looking for or completely over my head (I'm a junior developer, in my second week, straight out of school). Any help provided would be greatly appreciated. If there is any further info required, please let me know.
Thanks in advance.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Sending Email through Oracle Forms 6i [message #677630 is a reply to message #677417] |
Tue, 01 October 2019 09:33   |
shahzad-ul-hasan
Messages: 643 Registered: August 2002
|
Senior Member |
|
|
check that working fine for me.
create or replace PROCEDURE send_mail (p_to IN VARCHAR2,
p_from IN VARCHAR2,
p_message IN VARCHAR2,
p_smtp_host IN VARCHAR2,
p_smtp_port IN NUMBER DEFAULT 25)
AS
l_mail_conn UTL_SMTP.connection;
BEGIN
l_mail_conn := UTL_SMTP.open_connection(p_smtp_host, p_smtp_port);
UTL_SMTP.helo(l_mail_conn, p_smtp_host);
UTL_SMTP.mail(l_mail_conn, p_from);
UTL_SMTP.rcpt(l_mail_conn, p_to);
UTL_SMTP.data(l_mail_conn, p_message || UTL_TCP.crlf || UTL_TCP.crlf);
UTL_SMTP.quit(l_mail_conn);
END;
execute send_mail(p_to => 'recipient_email',p_from => 'sender_email',p_message => 'This is a test message.',p_smtp_host => 'SMTP_HOST_NAME',p_smtp_port=>25);
PL/SQL procedure successfully completed.
|
|
|
|