send calendar invitation from lotus to exchange through java domino api -
send calendar invitation from lotus to exchange through java domino api -
i trying send calendar invitation lotus exchange through java domino api. when send invitation 1 lotus business relationship other lotus account, successful. when send same exchange mail service account, exchange not showing invitation.
the code using fro follows:
package com.test; import java.util.date; import java.util.vector; import lotus.domino.database; import lotus.domino.datetime; import lotus.domino.document; import lotus.domino.notesfactory; import lotus.domino.session; import lotus.entity.meeting; import com.data.strings; public class calendertest { public static void main(string[] args){ vector<string> sendto = new vector<string>(); sendto.add("xxxx.xx.com"); meeting m = new meeting(); m.setdate("04-04-2013"); m.settime("06:06:06"); m.sethours("4"); m.setchair("xxxx.xx.com"); m.setsubject("testing calendar"); m.setlocation("testlocation"); m.setbody("testbody"); m.setsendto(sendto); seek { session s = notesfactory.createsessionwithior(strings.ior, "xxxxxxx", "xxxxx"); database db = s.getdatabase(s.getservername(), "xxxx"); document doc1 = db.createdocument(); doc1.appenditemvalue("form","notice"); doc1.appenditemvalue("noticetype","i"); doc1.appenditemvalue("_viewicon","133.0"); doc1.appenditemvalue("appointmenttype","3"); session stmp = db.getparent(); string[] date = m.getdate().split("-"); string[] time = m.gettime().split(":"); date exdate = new date(); exdate.setdate(integer.parseint(date[0])); exdate.sethours(integer.parseint(time[0])); exdate.setminutes(integer.parseint(time[1])); exdate.setmonth(integer.parseint(date[1])-1); exdate.setseconds(integer.parseint(time[2])); exdate.setyear(integer.parseint(date[2])-1900); system.out.println(exdate.tostring()); datetime currtime = stmp.createdatetime(exdate); doc1.appenditemvalue("startdatetime",currtime) ; doc1.appenditemvalue("calendardatetime",currtime); doc1.appenditemvalue("startdate",currtime) ; doc1.appenditemvalue("starttime",currtime) ; currtime.adjusthour(integer.parseint(m.gethours()), true); doc1.appenditemvalue("enddatetime",currtime) ; doc1.appenditemvalue("enddate",currtime) ; doc1.appenditemvalue("endtime",currtime) ; doc1.appenditemvalue("$nopurge",currtime) ; doc1.appenditemvalue("subject",m.getsubject()); doc1.appenditemvalue("location",m.getlocation()); doc1.appenditemvalue("body",m.getbody()); doc1.appenditemvalue("from",s.getusername()); doc1.appenditemvalue("chair",m.getchair()); doc1.appenditemvalue("requiredattendees",m.getsendto()); doc1.appenditemvalue("optionalattendees",m.getcopyto()); doc1.computewithform(true, false); doc1.save(true, false, false); doc1.send(m.getsendto()); } grab (exception e) { e.printstacktrace(); } } }
can give suggestions?
one possibility send .ics file:
begin:vcalendar version:2.0 prodid:-//hacksw/handcal//nonsgml v1.0//en begin:vevent uid:uid1@example.com dtstamp:19970714t170000z organizer;cn=john doe:mailto:john.doe@example.com dtstart:19970714t170000z dtend:19970715t035959z summary:bastille day party end:vevent end:vcalendar
http://en.wikipedia.org/wiki/icalendar
here related question:
adding icalendar .ics file lotus notes email
lotus-notes lotus-domino lotus
Comments
Post a Comment