Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

sending mail through clicking a button

636287Nov 12 2008 — edited Nov 12 2008
hi,
I am using oracle developer suite 10g and oracle database 10g.
the problem is like this , I have a table named emp which has two columns
employee_id number primary key,
and last_name varchar2(20) ;
I have two text boxes names :block3.text_item8 and :block3.text_item9 , and a push button named push_button4;
when I click on the button the data inside the text_boxes will be saved in the emp table as declared and also a mail will be sent to an email address which will be provided through another text_item :block3.text_item10 in the format say 123@abc.com .
I can save the data after clicking the button through simple dml queries , but I am not able to send the auto genearted mail which will send a message to that e-mail address that an entry with this mail account has been made .

could you please help me with a step by step procedure to do this.
Thanx for your interest .

Comments

Alok Dubey
Hi Sourav,
What is the code u r using to send the mail. In general utl_smtp is used to send the mail. For further information u can search in this forum, where in we've many examples. If u've written any code then do display the code. so that any one of us can help you.

Regards,
Alok Dubey
Hafed Benteftifa
Hello,

There are several options for sending email.

1) Write a stored procedure using utl_smtp or utl_mail (new with 10g). This is the easiest to implement. See for example: www.psoug.org/reference/utl_mail.html
Problems you can have here: your smtp server does not allow you to send email or won't relay emails from your side. Most problems I have seen with this implementation were related to the smtp server.

2) Use the javamail PJC/javabean from the Oracle PJC demos. This one is a bit easier to implement but does require some preliminary setup. You might have to check the smtp server again and make sure it can relay your emails.

Hope this helps.
Andreas Weiden
a third option is to use OLE (or CLIENT_OLE in 9i, 10g) and send the mail via outlook.
1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 10 2008
Added on Nov 12 2008
3 comments
517 views