Link to home
Start Free TrialLog in
Avatar of jufer
jufer

asked on

Send a invitation (calendar entry) with Java

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 :-)) )
Avatar of Giant2
Giant2

For scheduling you can use the Timer class.

Hope this could help you.
Here an example of scheduling recurring task (like a calendar):
http://www-128.ibm.com/developerworks/java/library/j-schedule.html

Bye, Giant.
Avatar of hoomanv
Are you looking for calander invites to integrate with Outlook, or is this a custom application?

colr__
Avatar of jufer

ASKER

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


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__

Avatar of jufer

ASKER

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
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__
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.
Avatar of jufer

ASKER

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
I would first try sending it as an attachment and see hat happens.

colr__
Avatar of jufer

ASKER

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
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.)
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__
Avatar of jufer

ASKER

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...
Do you tried my last suggest?
Avatar of jufer

ASKER

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...
ASKER CERTIFIED SOLUTION
Avatar of Giant2
Giant2

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jufer

ASKER

Thank you...
I haven't found the right solution but I have to postbone it....

cheers
jufer