Home » Developer & Programmer » Forms » send e-mail (oracle 10g, outlook 2007)
send e-mail [message #381929] Tue, 20 January 2009 05:55 Go to next message
imuharram
Messages: 48
Registered: January 2009
Member
I have an issue in an application that I want develop.
It's an application for following up work orders that are generated from a department, gets the approval from head of unit. After the approval it is sent to the destination department and after the task that is required in the work order is completed, they change the status from "Pending" to "Done".
My inquiry is I need an e-mail to be sent to the destination unit members through microsoft outlook or some kind of notification so they could know that there is a work order that needs to be checked. In addition, after the work has been checked to be "Done", I need an e-mail to be sent back to the originating unit members to be notified that the work order has been completed.

How could I automate sending an e-mail through outlook or have an instant notification or alert to inform the user of receiving the work order or changing its status.

we have oracle 10g, outlook 2007
Re: send e-mail [message #381967 is a reply to message #381929] Tue, 20 January 2009 08:22 Go to previous messageGo to next message
kamar_19
Messages: 52
Registered: June 2005
Location: pakistan
Member
hi
dear u can send mail by oracle form developer using utl_smtp utility .
please c procedure.

PROCEDURE SEND_Email(P_mailfrom varchar2,P_Mailto Varchar2,P_Subject Varchar2,P_Message Varchar2) IS
C Utl_Smtp.Connection;
BEGIN
C := Utl_Smtp.Open_Connection('smtp_server_name');
Utl_Smtp.Helo(C, 'domain_name');
Utl_Smtp.Mail(C, P_mailfrom);
Utl_Smtp.Rcpt(C, P_Mailto);
Utl_Smtp.Open_Data(C);

utl_smtp.write_data(c, 'From: ' || P_mailfrom || utl_tcp.crlf);
utl_smtp.write_data(c, 'To: ' || p_mailto || utl_tcp.crlf);
utl_smtp.write_data(c, 'Subject: ' || p_subject || utl_tcp.crlf);

utl_smtp.write_data(c, 'Content-Type: text/html' || utl_tcp.crlf);
utl_smtp.write_data(c, utl_tcp.crlf || p_message);


Utl_Smtp.Close_Data(C);
Utl_Smtp.Quit(C);
EXCEPTION
WHEN Utl_Smtp.Transient_Error OR Utl_Smtp.Permanent_Error THEN
Utl_Smtp.Quit(C);
RAISE_APPLICATION_ERROR(-20000,'FAILED TO SEND MAIL DUE TO THE FOLLOWING ERROR: ' || SQLERRM);
when others then
RAISE_APPLICATION_ERROR(-20001,'Some problem Exist: ' || SQLERRM);
END;



regards

Qamar Abbas
Re: send e-mail [message #382005 is a reply to message #381967] Tue, 20 January 2009 10:49 Go to previous messageGo to next message
Kevin58
Messages: 79
Registered: January 2009
Member
Where can one find the UTL_SMTP package?
Thanks,


Kevin
Re: send e-mail [message #382312 is a reply to message #381929] Wed, 21 January 2009 22:33 Go to previous messageGo to next message
parag_narkhede
Messages: 110
Registered: January 2008
Location: Pune
Senior Member
It is standard package available in oracle database.
Re: send e-mail [message #382349 is a reply to message #381929] Thu, 22 January 2009 00:20 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Search this forum for 'mail' or 'email' and 'outlook'.

David
Previous Topic: how to change rotation angle of arc at runtime
Next Topic: PDE-PLI018
Goto Forum:
  


Current Time: Wed Dec 07 02:44:44 CST 2016

Total time taken to generate the page: 0.09725 seconds