Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ical event invitation

843830Apr 15 2007 — edited Apr 15 2007
Hello,

I have made a javax e-mail method which is able to send an ical file (*.ics) to invite participants to an event. But when the e-mail is recieved (by any mail programs) the mail programs doesn�t popup with an automatically event request to the reciever. The ical file is just visible as an attachment.

I hope that I can get a solution where the mail program asks the reciever if he wants to accept/reject the invitation, just after opening the e-mail.

I try different kind of ways to invoke an automatically REQUEST, but its doesn�t seem to help?

In the ical file:

code:
--------------------------------------------------------------------------------

"PRODID:-//Microsoft Corporation//Outlook 9.0 MIMEDIR//EN\n" +"VERSION:2.0\n" +"METHOD:REQUEST\n" +...

--------------------------------------------------------------------------------

In the javax mail method:

code:
--------------------------------------------------------------------------------
...
MimeMessage msg = new MimeMessage( session );
msg.addHeaderLine("method=REQUEST");
msg.addHeaderLine("charset=iso-8859-1");
msg.addHeaderLine("component=vevent");
...
MimeBodyPart mbp3 = new MimeBodyPart();
String filename = "invitation.ics";
mbp3.setFileName( filename );
mbp3.setHeader("Content-Class", "urn:content-classes:calendarmessage");
mbp3.setHeader("Content-ID","calendar_message");
mbp3.setContent( getIcalEvent().toString(), "text/calendar;method=REQUEST");
...

MimetypesFileTypeMap mimetypes = (MimetypesFileTypeMap)MimetypesFileTypeMap.getDefaultFileTypeMap();
mimetypes.addMimeTypes("text/calendar ics ICS");
MailcapCommandMap mailcap = (MailcapCommandMap)MailcapCommandMap.getDefaultCommandMap();mailcap.addMailcap("text/calendar;; x-java-content-handler=com.sun.mail.handlers.text_plain");

--------------------------------------------------------------------------------

Can you help me? Thanks.

Message was edited by:
jsjeppe

null
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 13 2007
Added on Apr 15 2007
0 comments
267 views