-
Notifications
You must be signed in to change notification settings - Fork 5
Create Draft Appointment Request
shoaibkhan-aspose edited this page Jun 12, 2014
·
2 revisions
String sender = "[email protected]";
String recipient = "[email protected]";
MailMessage message = new MailMessage(sender, recipient, "", "");
Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
calendar.set(2012, Calendar.NOVEMBER, 1, 0, 0, 0);
Date startDate = calendar.getTime();
calendar.set(2012, Calendar.DECEMBER, 1);
Date endDate = calendar.getTime();
MailAddressCollection attendees = new MailAddressCollection();
attendees.addMailAddress(new MailAddress("[email protected]", "Attendee"));
WeeklyRecurrencePattern expected = new WeeklyRecurrencePattern(3);
Appointment app = new Appointment("Appointment Location", "Appointment Summary", "Appointment Description",
startDate, endDate,
new MailAddress("[email protected]", "Organizer"), attendees, expected);
//Set the Appointment as Draft
app.setMethod(AppointmentMethodType.Publish);//.Method = AppointmentMethodType.Publish;
message.addAlternateView(app.requestApointment());
MapiMessage msg = MapiMessage.fromMailMessage(message);
// Save the appointment as draft.
msg.save("data/AsposeDraft.msg");
Download Source Code
For further releases and updates, please follow these new repositories:
- Aspose.Words Java for Apache POI
- Aspose.Cells Java for Apache POI
- Aspose.Slides Java for Apache POI
- Aspose.Email Java for Apache POI
- For documentation, please visit Aspose Docs.
- Raise your queries and suggest more examples via Aspose Forums or via new social coding sites.