?
Solved

Send a invitation (calendar entry) with Java

Posted on 2006-05-09
23
Medium Priority
?
2,017 Views
Last Modified: 2013-11-24
Hi All,
I'm looking for a "easy" solution to send a calendar invitation from my java application.
Example: invite "info@myemail.com" to a meeting 31.12.2007 20:00 until  the 01.01.2008 11:00.
Can anyone provide me some help? (code and framework?)
I will use this in my Application (Java 1.5, J2EE 1.4, Struts 1.2.x, Tomcat 5.5.x, MySQL 5.x)
cheers Gabriel

(ps: for 500 points I expect a little bit more than just a library name :-), a demo code would be fine :-)) )
0
Comment
Question by:jufer
  • 9
  • 7
  • 6
  • +1
23 Comments
 
LVL 12

Expert Comment

by:Giant2
ID: 16640007
0
 
LVL 12

Expert Comment

by:Giant2
ID: 16640042
For scheduling you can use the Timer class.

Hope this could help you.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 12

Expert Comment

by:Giant2
ID: 16640059
Here an example of scheduling recurring task (like a calendar):
http://www-128.ibm.com/developerworks/java/library/j-schedule.html

Bye, Giant.
0
 
LVL 14

Expert Comment

by:hoomanv
ID: 16640100
0
 
LVL 8

Expert Comment

by:colr__
ID: 16640118
Are you looking for calander invites to integrate with Outlook, or is this a custom application?

colr__
0
 

Author Comment

by:jufer
ID: 16646164
Hi Giant2, Hoomanv, Colr,
thanks for the fast respond.
I want to integrate my application with "Outlook" or other Email/Calendard Software. I want to send an invitation to an user (email-address) like you can do it
in the calendar of outlook (add some attandee, and they will get a invitation-email...) I had a look on iCal or vCal standard, this must be the way, but...
What do I have to send???
I don't want to send the Email at a specific time, so a timer does not help.
I know a little bit the Java.Mail API, but I have no clue, what I have to send to make this happen  (is it just the content, or header, or ? ).

thank you
jufer


0
 
LVL 8

Expert Comment

by:colr__
ID: 16646859
The good news is that this is doable. The bad new is that you are going to do a bit of research for this project.

JavaMail API - youll need to be at least able to send emails, which is quite easy with this API and if you are already familiar with Java.

JNDI - this is the java API  for integrating java code with native code, i.e. DLL files and .exe files and the like. Since Outlook is a native Windows language, youll need JNDI to itegrate with the Outlook API.

And last, but certainly not least, youll need to have a look at the Outlook API. This should explain the process/protocol for sending calander invites. In general, the Outlook API will allow you to integrate with Outlook.
Hers a good link for the Outloook API: http://www.outlookcode.com/d/.

Heres another link that you might find useful: http://www.sun.com/software/products/calendar_srvr/ds_calendar.xml.

colr__

0
 

Author Comment

by:jufer
ID: 16648214
Hi Colr_
Is it not possible to send an email with special header and content to my email address. So when I open Outlook, it will show me the email as an "invitation", which I can accept (-> generates an item in the Outlook Calendar ). I did already a research and I found out, that I have to use the ical (or vcalendar) Standard. There is also a Framework which will help, iCal4J, this generates me the byte. But know I'm stranded.... what do I have to do to send it? Attached as a file will not realy work...

cheers
jufer
0
 
LVL 8

Expert Comment

by:colr__
ID: 16648352
It will be possible, but you will have to familiarise yourself with the protocal for doing this. My apologiers in the post above, I thought the invitation standard was a propriety Micrsoft protocol, but your right, the iCal4J API can be used to integrate this process.

Sicne iCal4J gives you the bytestream you need, you'l now need to look more closely at how Outlook accepts this bytestream, and try to implement that protocol. There will be a special way of formatting the message you send to Outlook that will cause it to be recognised as a calander invitation.

colr__
0
 
LVL 12

Expert Comment

by:Giant2
ID: 16648391
I believe you must create the ".ics" file even using icalJ and link it in the e-mail like a background sound.
It's the same manner you can send an html page with a background.

Bye, Giant.
0
 

Author Comment

by:jufer
ID: 16648440
Giant2,
sound a good way, but ...
How can I send it as background? Sorry, I have no clue how to send an html page with background as well. ?

cheers
Gabriel
0
 
LVL 8

Expert Comment

by:colr__
ID: 16648452
I would first try sending it as an attachment and see hat happens.

colr__
0
 

Author Comment

by:jufer
ID: 16648472
Hi Colr,
did it and a file appears in the mail. when I open (double click), then it will show me the invitation and ask me...
cheers
jufer
0
 
LVL 12

Expert Comment

by:Giant2
ID: 16648474
It's only an html. So you must use an html tag to specify the background.
For the sound is <BGSOUND...>

To be sure you can do in this manner. Create one invitation your own to you (like colr_ told) and after see the message you receive (see properties, etc.)
0
 
LVL 12

Expert Comment

by:Giant2
ID: 16648517
Try to use this code:
http://www.java2s.com/Code/Java/Network-Protocol/SendMimesendamultipartMIMEemailmessage.htm

Hope this could help you.
Bye, Giant.
0
 
LVL 8

Expert Comment

by:colr__
ID: 16648529
Is that you sorted then, or are you still lookingo to get the complete Outlook behaviour? Its a start anyway, so youre obviously on the right road.

colr__
0
 

Author Comment

by:jufer
ID: 16681863
Hi all,
I'm still tring to send the invitation... I was reading some info on the sun forum, but I could't get it to work so far....
I will let you know...
0
 
LVL 12

Expert Comment

by:Giant2
ID: 16682617
Do you tried my last suggest?
0
 

Author Comment

by:jufer
ID: 16708252
Giant2,
yes but I don't see any differences to the other solution. It' still don't ask my if I want to add this appointment to the calendar (outlook)...
I'm still have to check this...
0
 
LVL 12

Accepted Solution

by:
Giant2 earned 750 total points
ID: 16708650
It could be your Outlook has this feature disabled?
Other appointment genred by other Outlook are managed automatically (like you want)?
0
 
LVL 8

Assisted Solution

by:colr__
colr__ earned 750 total points
ID: 16708678
If Outlook is recognising it as an invite when its sent as an attachment and double clicked, then the protocol must be correct.

If this is the case, then try sending it diferrently - try coding it into the body of the email? In oe of the headres? As an image?

colr__
0
 

Author Comment

by:jufer
ID: 16740459
Thank you...
I haven't found the right solution but I have to postbone it....

cheers
jufer
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses
Course of the Month16 days, 3 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question