Home » Developer & Programmer » Forms » email attachement from forms 4.5
email attachement from forms 4.5 [message #79070] Sat, 20 April 2002 03:18 Go to next message
DHAVAL P SHAH
Messages: 1
Registered: April 2002
Junior Member
does any body having any idea how to send email using forms 4.5 on oracle 8.1.7 without using oracle JVM. or is there any 3rd party tool throgh which we can achive this.

DHAVAL Shah
Re: email attachement from forms 4.5 [message #79078 is a reply to message #79070] Mon, 22 April 2002 04:23 Go to previous message
nik
Messages: 55
Registered: January 2002
Member
hi,
this could help a little, maybe ??

Here is a stored procedure to send an email message using Oracle's utl_smtp package. Someone tested this on Oracle 8.1.7 running on HP UX 10.20 system, with the Exchange server is installed on an NT 4 SP6 machine.

Create or replace PROCEDURE
send_mail (sender IN VARCHAR2,
recipient IN VARCHAR2,
message IN VARCHAR2,
nStatus OUT NUMBER)
IS
mailhost VARCHAR2(30) := 'email.hai.iec.co.il';
mail_conn utl_smtp.connection;

BEGIN
nStatus := 0;
mail_conn := utl_smtp.open_connection(mailhost, 25);
utl_smtp.helo(mail_conn, mailhost);
utl_smtp.mail(mail_conn, sender);
utl_smtp.rcpt(mail_conn, recipient);

utl_smtp.data(mail_conn, message);
utl_smtp.quit(mail_conn);
EXCEPTION
WHEN OTHERS THEN
nStatus := SQLCODE;
END send_mail;
If the mail host name is verified as OK, you use the stored procedure by running this (in SQL*Plus, for example):
var s number
exec send_mail ('OracleServer@hotmail.com','tlinde@amfam.com','test text msg',:s);
The recipient should be a valid email, the sender can be a fictitious Oracle server email.

let me know how u get on.

nik.
Previous Topic: In Forms...
Next Topic: How can convert the acess tables or exel files to oracle 8i
Goto Forum:
  


Current Time: Fri Apr 19 00:37:28 CDT 2024