email - Meeting Invite on Lotus notes using Java API -


i getting problem while sending meeting invite in lotus notes.i trying see in accept/decline feature format instead coming add calendar feature only.so if can me great.here code

        properties props = new properties();         props.put("mail.smtp.host", smtp_host_name);          props.put("mail.smtp.auth", "false");          authenticator auth = new smtpauthenticator();         session session = session.getinstance(props, auth);          session.setdebug(debug);          mimemessage msg = new mimemessage(session);         msg.addheaderline("method=request");         msg.addheaderline("charset=utf-8");         msg.addheaderline("component=vevent");          internetaddress addressfrom = new internetaddress(from);         msg.setfrom(addressfrom);          if (!(recipients == null)) {              internetaddress[] addressto = new internetaddress[recipients.length];             (int = 0; < recipients.length; i++) {                 addressto[i] = new internetaddress(recipients[i]);              }              log.debug("setting recipients");             msg.setrecipients(message.recipienttype.to, addressto);          }         if (!(recipientcc == null)) {              internetaddress[] addresscc = new internetaddress[recipientcc.length];             (int j = 0; j < recipientcc.length; j++) {                 addresscc[j] = new internetaddress(recipientcc[j]);              }             log.debug("setting cc recipients");             msg.setrecipients(message.recipienttype.cc, addresscc);          }          msg.setsubject(subject);          stringbuffer sb = new stringbuffer();          stringbuffer buffer = sb                 .append("begin:vcalendar\n"                         + "x-lotus-charset:utf-8\n"                         + "prodid:-//lotus development corporation//nonsgml notes 8.5//en_c\n"                         + "version:2.0\n"                         + "begin:vevent\n"                         + "categories:meeting\n"                         + "status:needs action\n"                         + "dtstart:20130727t184555\n"                         + "dtend:20130727t194555\n"                         + "dtstamp:20130727t184555\n"                         + "sequence:0\n"                         + "expect:immediate\n"                         + "description:steve , john review newest proposal material\n"                         + "summary:"                         + subject                         + "\n"                         + "class:public\n"                         + "uid:86dc83601f9625c465257bb40047fe17-lotus_notes_generated\n"                         + "x-lotus-update-seq:1\n"                         + "x-lotus-update-wisl:$s:1;$l:1;$b:1;$r:1;$e:1;$w:1;$o:1;$m:1\n"                         + "x-lotus-notesversion:2\n"                         + "x-lotus-noticetype:i\n"                         + "x-lotus-appttype:3\n"                         + "x-lotus-child-uid:86dc83601f9625c465257bb40047fe17\n"                         + "end:vevent\n" + "end:vcalendar\n");          // create message part         bodypart messagebodypart = new mimebodypart();          // fill message         messagebodypart.setheader("content-class",                 "urn:content-classes:calendarmessage");         messagebodypart.setheader("content-id", "calendar_message");         messagebodypart                 .setdatahandler(new datahandler(new bytearraydatasource(                         buffer.tostring(), "text/calendar")));//                                                                 // important         // create multipart         multipart multipart = new mimemultipart();          // add part 1         multipart.addbodypart(messagebodypart);          // put parts in message          msg.setcontent(multipart);         log.debug("sending mail");         transport.send(msg); 

you need create group event instead of public event, if want able respond. can read in rfc 2446.

it mandatory define attendees group event work (see chapter 4.2 in above documentation). might this:

attendee;role=chair;partstat=accepted;cn=big a:mailto:a@example.com attendee;rsvp=true;type=individual;cn=b:mailto:b@example.com 

rsvp=true lets b respond.

if need make sure, appointments not mixed up, generate unique uid every event , reuse if changes. otherwise not able send updates.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -