How to send emeil from form 6i? [message #656184] |
Tue, 27 September 2016 07:39  |
 |
usman8990
Messages: 6 Registered: May 2016 Location: Pakistan
|
Junior Member |
|
|
I have a table which we create to give task to employees ....
Create table Business (emp_id number(10),emp_name varchar2(25),Deal_Date Date,Given_Date Date,Target_Date Date,Com_Date date,Naration varchar2(20),Catagory varchar2(25),Quality varchar2(20),emp_email varchar2(40),Deal number(20),paide number(10));
The target is when we press on the save button the data should be save and also send to Employees via email address which we will save into the column "EMp_Email" ...
please Create a procedure or Function to solve this problem
|
|
|
|
|
Re: How to send emeil from form 6i? [message #656190 is a reply to message #656189] |
Tue, 27 September 2016 10:52   |
John Watson
Messages: 8965 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Coime on, man! Look at utl_mail, it isn't exactly difficult:orclz> desc utl_mail
PROCEDURE SEND
Argument Name Type In/Out Default?
------------------------------ ----------------------- ------ --------
SENDER VARCHAR2 IN
RECIPIENTS VARCHAR2 IN
CC VARCHAR2 IN DEFAULT
BCC VARCHAR2 IN DEFAULT
SUBJECT VARCHAR2 IN DEFAULT
MESSAGE VARCHAR2 IN DEFAULT
MIME_TYPE VARCHAR2 IN DEFAULT
PRIORITY BINARY_INTEGER IN DEFAULT
REPLYTO VARCHAR2 IN DEFAULT
PROCEDURE SEND_ATTACH_RAW
Argument Name Type In/Out Default?
------------------------------ ----------------------- ------ --------
SENDER VARCHAR2 IN
RECIPIENTS VARCHAR2 IN
CC VARCHAR2 IN DEFAULT
BCC VARCHAR2 IN DEFAULT
SUBJECT VARCHAR2 IN DEFAULT
MESSAGE VARCHAR2 IN DEFAULT
MIME_TYPE VARCHAR2 IN DEFAULT
PRIORITY BINARY_INTEGER IN DEFAULT
ATTACHMENT RAW IN
ATT_INLINE BOOLEAN IN DEFAULT
ATT_MIME_TYPE VARCHAR2 IN DEFAULT
ATT_FILENAME VARCHAR2 IN DEFAULT
REPLYTO VARCHAR2 IN DEFAULT
PROCEDURE SEND_ATTACH_VARCHAR2
Argument Name Type In/Out Default?
------------------------------ ----------------------- ------ --------
SENDER VARCHAR2 IN
RECIPIENTS VARCHAR2 IN
CC VARCHAR2 IN DEFAULT
BCC VARCHAR2 IN DEFAULT
SUBJECT VARCHAR2 IN DEFAULT
MESSAGE VARCHAR2 IN DEFAULT
MIME_TYPE VARCHAR2 IN DEFAULT
PRIORITY BINARY_INTEGER IN DEFAULT
ATTACHMENT VARCHAR2 IN
ATT_INLINE BOOLEAN IN DEFAULT
ATT_MIME_TYPE VARCHAR2 IN DEFAULT
ATT_FILENAME VARCHAR2 IN DEFAULT
REPLYTO VARCHAR2 IN DEFAULT
orclz>
It is well dedscribed in the docs, too. Just have a go.
|
|
|
|
|
|
Re: How to send emeil from form 6i? [message #656197 is a reply to message #656192] |
Wed, 28 September 2016 01:51  |
John Watson
Messages: 8965 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
What happens when you run your code? It doesn't work for me:orclz>
orclz> var p_from varchar2(30)
orclz> var p_to varchar2(30)
orclz>
orclz> BEGIN
2 UTL_MAIL.send_attach_varchar2(sender => :p_from,
3 recipients => :p_to,
4 subject => 'Test msg',
5 attachment => 'Test text 1' || UTL_TCP.crlf || 'Test text 2',
6 att_inline => FALSE,
7 att_filename => 'test.PDF'
8 );
9 END;
10 /
BEGIN
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.UTL_MAIL", line 662
ORA-06512: at "SYS.UTL_MAIL", line 713
ORA-06512: at line 2
orclz> When you post code, please enclose it within [code] tags, as described here How to use [code] tags and make your code easier to read
|
|
|