Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL
What is plsql code to get calender alerts in emails?
 
explanation: Whenever we r having a meeting then we get alerts ,i want the code regarding the calender alerts.
Posted 7-Nov-12 2:05am
aks87265
Edited 23-Jan-13 23:58pm
9.1K
v3
Comments
joshrduncan2012 at 7-Nov-12 9:16am
   
"I want" doesn't work here. What have you tried so far? If you attempt something and get stuck, then we can try to help you.
aks87 at 12-Nov-12 3:08am
   

create or replace PACKAGE sendmail_pkg IS
 
procedure common (p_sender varchar2,
p_recipient varchar2,
p_subject varchar2,
c out utl_smtp.connection);
 
procedure send (p_sender varchar2,
p_recipient varchar2,
p_subject varchar2,
p_body varchar2 default null);


 
end sendmail_pkg;
 
/
 

 
create or replace PACKAGE BODY sendmail_pkg AS

procedure common (p_sender varchar2,
p_recipient varchar2,
p_subject varchar2,
c out utl_smtp.connection) is
 
v_recipient varchar2(1000);
begin
 
--make connection to smtp
c := utl_smtp.open_connection('10.160.0.1');
 
--identify the domain of the sender
utl_smtp.helo(c, 'https://mail.tcs.com/owa');
 
--start a mail, specify the sender
utl_smtp.mail(c, p_sender);
 
--identify recipient
utl_smtp.rcpt(c, v_recipient);
 
--start the mail body
utl_smtp.open_data(c);
 
utl_smtp.write_data(c, 'From: ' || p_sender || utl_tcp.crlf);
utl_smtp.write_data(c, 'To: ' || p_recipient || utl_tcp.crlf);
utl_smtp.write_data(c, 'Subject: ' || p_subject || utl_tcp.crlf);
 
exception
when utl_smtp.transient_error or utl_smtp.permanent_error then
utl_smtp.quit(c);
raise;
when others then
raise;
end common;
 
procedure send (p_sender varchar2,
p_recipient varchar2,
p_subject varchar2,
p_body varchar2 default null) is
 
c utl_smtp.connection;
 
begin
 
common(p_sender, p_recipient, p_subject, c);
 
utl_smtp.write_data(c, 'Content-Type: text/html' || utl_tcp.crlf);
utl_smtp.write_data(c, utl_tcp.crlf || p_body);
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;
when others then
raise;
end send;
 
end sendmail_pkg;
/
 

 

This is code this is compiling as well,,
 
but i need to know how to change it for getting calender alerts on Lotus notes.
Richard MacCutchan at 7-Nov-12 11:48am
   
This will largely depend on the email and calendar systems you are using. See what options they provide for you.
aks87 at 12-Nov-12 3:08am
   

create or replace PACKAGE sendmail_pkg IS
 
procedure common (p_sender varchar2,
p_recipient varchar2,
p_subject varchar2,
c out utl_smtp.connection);
 
procedure send (p_sender varchar2,
p_recipient varchar2,
p_subject varchar2,
p_body varchar2 default null);


 
end sendmail_pkg;
 
/
 

 
create or replace PACKAGE BODY sendmail_pkg AS

procedure common (p_sender varchar2,
p_recipient varchar2,
p_subject varchar2,
c out utl_smtp.connection) is
 
v_recipient varchar2(1000);
begin
 
--make connection to smtp
c := utl_smtp.open_connection('10.160.0.1');
 
--identify the domain of the sender
utl_smtp.helo(c, 'https://mail.tcs.com/owa');
 
--start a mail, specify the sender
utl_smtp.mail(c, p_sender);
 
--identify recipient
utl_smtp.rcpt(c, v_recipient);
 
--start the mail body
utl_smtp.open_data(c);
 
utl_smtp.write_data(c, 'From: ' || p_sender || utl_tcp.crlf);
utl_smtp.write_data(c, 'To: ' || p_recipient || utl_tcp.crlf);
utl_smtp.write_data(c, 'Subject: ' || p_subject || utl_tcp.crlf);
 
exception
when utl_smtp.transient_error or utl_smtp.permanent_error then
utl_smtp.quit(c);
raise;
when others then
raise;
end common;
 
procedure send (p_sender varchar2,
p_recipient varchar2,
p_subject varchar2,
p_body varchar2 default null) is
 
c utl_smtp.connection;
 
begin
 
common(p_sender, p_recipient, p_subject, c);
 
utl_smtp.write_data(c, 'Content-Type: text/html' || utl_tcp.crlf);
utl_smtp.write_data(c, utl_tcp.crlf || p_body);
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;
when others then
raise;
end send;
 
end sendmail_pkg;
/
 

 

This is code this is compiling as well,,
 
but i need to know how to change it for getting calender alerts on Lotus notes.
Richard MacCutchan at 8-Nov-12 5:10am
   
You have changed your question from "Java" to "SQL". How do you think that will change the fact that this depends on the email system you are using? Also what does this have to do with SQL?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Schatak 394
1 OriginalGriff 340
2 _Amy 115
3 Abhijit Ghosh (Subho) 115
4 Andreas Gieriet 100
0 OriginalGriff 7,107
1 Sergey Alexandrovich Kryukov 5,623
2 Maciej Los 3,504
3 Peter Leow 3,373
4 DamithSL 2,505


Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 24 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100