|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Sending Email through Oracle Forms 6i
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 visibly opening Outlook or opening another Canvas) to a recipient detailing some on the information presented from that form. I've searched through many of 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. |
|
#2
|
|||
|
|||
|
code
Here you go:
goto asktom.oracle.com http://asktom.oracle.com/pls/ask/f?p=4950:8:7310428837039358778::NO::F4950_P8_DISPL AYID,F4950_P8_CRITERIA:255615160805 basically, create the stuff below. create a button on the form, call send_mail.. you will need to know you mailhost code.. tkyte@TKYTE816> create or replace 2 PROCEDURE send_mail (p_sender IN VARCHAR2, 3 p_recipient IN VARCHAR2, 4 p_message IN VARCHAR2) 5 as 6 l_mailhost VARCHAR2(255) := 'aria.us.oracle.com'; 7 l_mail_conn utl_smtp.connection; 8 BEGIN 9 l_mail_conn := utl_smtp.open_connection(l_mailhost, 25); 10 utl_smtp.helo(l_mail_conn, l_mailhost); 11 utl_smtp.mail(l_mail_conn, p_sender); 12 utl_smtp.rcpt(l_mail_conn, p_recipient); 13 utl_smtp.open_data(l_mail_conn ); 14 utl_smtp.write_data(l_mail_conn, p_message); 15 utl_smtp.close_data(l_mail_conn ); 16 utl_smtp.quit(l_mail_conn); 17 end; 18 / Procedure created. tkyte@TKYTE816> begin 2 send_mail( 'thomas.kyte@oracle.com', 3 'tkyte@oracle.com', 4 'Hello Tom' ); 5 end; 6 / PL/SQL procedure successfully completed. |
|
#3
|
|||
|
|||
|
Hi
If i want to add attachments to this e-mail than what need to be added in this code.
Regards, Mukhtar Quote:
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > General SQL Development > Sending Email through Oracle Forms 6i |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|