ड्राफ्ट नियुक्ति अनुरोध बनाएं

Aspose.Email - ड्राफ्ट अपॉइंटमेंट अनुरोध बनाएं

ड्राफ्ट मोड में एक अपॉइंटमेंट अनुरोध बनाना उपयोगी हो सकता है, ताकि मूल जानकारी जोड़ी जा सके और फिर वही ड्राफ्ट अपॉइंटमेंट अन्य उपयोगकर्ताओं को अग्रेषित किया जा सके जो परिवर्तन कर सकते हैं। Aspose.Email for Java ड्राफ्ट मोड में अपॉइंटमेंट बनाने और बाद में उपयोग के लिए सहेजने की लचीलापन प्रदान करता है।

ड्राफ्ट मोड में अपॉइंटमेंट सहेजने के लिए, Appointment क्लास की Method प्रॉपर्टी को Publish सेट किया जाना चाहिए।

Java


 String sender = "test@gmail.com";

String recipient = "test@email.com";

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("attendee_address@aspose.com", "Attendee"));

WeeklyRecurrencePattern expected = new WeeklyRecurrencePattern(3);

Appointment app = new Appointment("Appointment Location", "Appointment Summary", "Appointment Description",

        startDate, endDate,

        new MailAddress("organizer_address@aspose.com", "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");

चल रहा कोड डाउनलोड करें

नीचे उल्लेखित किसी भी सोशल कोडिंग साइट से Create Draft Appointment Request डाउनलोड करें: