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 #148795 is a reply to message #87844] |
Mon, 28 November 2005 04:04 |
neom
Messages: 1 Registered: November 2005 Location: ireland
|
Junior Member |
|
|
Thanks for the code, was very handy.
The default mail is microsoft office outlook 2003. I get the pop up window with the following message.
"A program is trying to automatically send e-mail on your behalf.
Do you want to allow this.
If this is unexpected, it may be a virus and you should choose 'No'".
In outlook express i found that there is a option under Tools->Options-> Security tab "Warn me when other application are trying to send mail as me".
Could not find similar option in outlook.
Can anyone let me know as to how could i suppress the pop-up window.
|
|
|
|
|
|
|
|
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: 640 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.
|
|
|
|