MAIL [message #128903] |
Thu, 21 July 2005 02:48 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sQeKy
Messages: 24 Registered: July 2005
|
Junior Member |
|
|
Sigh .. i did not find any java beans and my boss does not want to use outlook for sending mails ....
ok now i think the utl_smpt ... is the last resort ....
I have found a couple of snippets over the net but they dont seem to work :S
I need help .. please give a full procedure or site where the full procedure is given :/
thanks
|
|
|
|
Re: MAIL [message #128914 is a reply to message #128905] |
Thu, 21 July 2005 03:59 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sQeKy
Messages: 24 Registered: July 2005
|
Junior Member |
|
|
okay i found this snippet some where ...
PROCEDURE SimpleTextMessage IS
mailHOST VARCHAR2(64) := 'mail@softech.com';
mailFROM VARCHAR2(64);
mailTO VARCHAR2(64);
mailCONN utl_smtp.connection;
mailDATE VARCHAR2(20);
vreply utl_smtp.reply;
vreplies utl_smtp.replies;
i number;
BEGIN
mailFROM := 'ibraheem@softech.com';
mailTO := 'squekylilbrat@gmail.com';
SELECT TO_CHAR(SYSDATE,'MM/DD/YYYY HH24:MI:SS') INTO mailDATE FROM dual;
dbms_output.put_line('open_connection');
dbms_output.put_line('---------------');
vreply := utl_smtp.open_connection(mailHOST, 25, mailCONN);
dbms_output.put_line( 'code = ' || vreply.code );
dbms_output.put_line( 'text = ' || vreply.text );
dbms_output.put_line('help');
dbms_output.put_line('----');
vreplies := utl_smtp.help(mailCONN, 'HELP');
for i in 1..vreplies.count loop
dbms_output.put_line( 'code = ' || vreplies(i).code );
dbms_output.put_line( 'text = ' || vreplies(i).text );
end loop;
dbms_output.put_line('ehlo');
dbms_output.put_line('----');
vreplies := utl_smtp.ehlo(mailCONN, mailHOST);
for i in 1..vreplies.count loop
dbms_output.put_line( 'code = ' || vreplies(i).code );
dbms_output.put_line( 'text = ' || vreplies(i).text );
end loop;
--dbms_output.put_line('helo');
--dbms_output.put_line('----');
--vreply := utl_smtp.helo(mailCONN, mailHOST);
--dbms_output.put_line( 'code = ' || vreply.code );
--dbms_output.put_line( 'text = ' || vreply.text );
dbms_output.put_line('mail');
dbms_output.put_line('----');
vreply := utl_smtp.mail(mailCONN, mailFROM);
dbms_output.put_line( 'code = ' || vreply.code );
dbms_output.put_line( 'text = ' || vreply.text );
dbms_output.put_line('rcpt');
dbms_output.put_line('----');
vreply := utl_smtp.rcpt(mailCONN, mailTO);
dbms_output.put_line( 'code = ' || vreply.code );
dbms_output.put_line( 'text = ' || vreply.text );
dbms_output.put_line('open_data');
dbms_output.put_line('---------');
vreply := utl_smtp.open_data(mailCONN);
dbms_output.put_line( 'code = ' || vreply.code );
dbms_output.put_line( 'text = ' || vreply.text );
utl_smtp.write_data(mailCONN, 'Subject: '|| 'A subject' || chr(13));
utl_smtp.write_data(mailCONN, 'From: '||mailFROM || chr(13));
utl_smtp.write_data(mailCONN, 'Date: '||mailDATE || chr(13));
utl_smtp.write_data(mailCONN, 'To: '||mailTO || chr(13));
utl_smtp.write_data(mailCONN, 'CC: '||mailFROM || chr(13));
utl_smtp.write_data(mailCONN, 'BCC: '||mailFROM || chr(13));
utl_smtp.write_data(mailCONN, chr(13));
utl_smtp.write_data(mailCONN, 'Hello Friend.' || chr(13));
utl_smtp.write_data(mailCONN, 'Drop me an e-mail.' || chr(13));
dbms_output.put_line('close_data');
dbms_output.put_line('----------');
vreply := utl_smtp.close_data(mailCONN);
dbms_output.put_line( 'code = ' || vreply.code );
dbms_output.put_line( 'text = ' || vreply.text );
dbms_output.put_line('quit');
dbms_output.put_line('----');
vreply := utl_smtp.quit(mailCONN);
dbms_output.put_line( 'code = ' || vreply.code );
dbms_output.put_line( 'text = ' || vreply.text );
END;
i have put this procedure in my program units .. i created a button and called SimpleTextMessage();
Can any one tell me if its bound to work or not .. coz its not working ... are there any problems with this ... or what :/
|
|
|
|
Re: MAIL [message #129394 is a reply to message #129173] |
Mon, 25 July 2005 01:03 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sQeKy
Messages: 24 Registered: July 2005
|
Junior Member |
|
|
OK that is JSP ... using java mail api
i need oracle forms using java mail api!!!
|
|
|
|
Re: MAIL [message #508103 is a reply to message #129443] |
Thu, 19 May 2011 08:05 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/156655.jpg) |
randriana
Messages: 18 Registered: September 2010
|
Junior Member |
|
|
I have the same problem but mine is :
1- I have a table that lists a multiple person with their email
2- I have a .xls files that a must send with them every month
Any one can help me to do this with oracle forms 10g interface and save the date of sending and the operator who sent it? As like a cursor or another thing...
|
|
|