I am using ical4j (version 3.0.1) to send an email to an Outlook email address (Office 365). Here is what I see in an email:
You can see the Calendar.ics attachment and clicking on the down arrow allows you to add the event to your Outlook calendar. This works, but not good as the following one.
When I create an appointment in Outlook for someone, I can directly see the appointment info and action buttons (Accept, etc.) in the email, as shown below.
How can I do it through ical4j?
Update 1:
Due to Arnaud's input, I have made my code work by adding the following line:
icsCalendar.getProperties().add(Method.REQUEST);
and updating this link:
messageBodyPart.setDataHandler(new DataHandler(new ByteArrayDataSource(icsCalendar.toString(), "text/calendar; charset=\"utf-8\"; method=REQUEST")));