कैलेंडर आइटम में अटैचमेंट जोड़ना
Contents
[
Hide
]
Aspose.Email - कैलेंडर आइटम्स में अटैचमेंट जोड़ना
Aspose.Email एक अटैचमेंट्स संग्रह प्रदान करता है जिसका उपयोग कैलेंडर आइटम्स से जुड़े अटैचमेंट्स को जोड़ने के लिए किया जा सकता है।
Java
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.addItem(new MailAddress("attendee_address@domain.com", "Attendee"));
WeeklyRecurrencePattern expected = new WeeklyRecurrencePattern(3);
Appointment app = new Appointment("Appointment Location", "Appointment Summary", "Appointment Description",
startDate, endDate,
new MailAddress("organizer_address@domain.com", "Organizer"), attendees, expected);
//Attach a file from disc to this appointment
File file = new File(dataDir + "AsposeXLS.xls");
FileInputStream fis = new FileInputStream(file);
Attachment att = new Attachment(fis, file.getName());
app.getAttachments().addItem(att);
fis.close();
String savedFile = dataDir + "AppWithAttachments.ics";
app.save(savedFile, AppointmentSaveFormat.Ics);
चल रहा कोड डाउनलोड करें
नमूना कोड डाउनलोड करें
अधिक विवरण के लिए देखें कैलेंडर आइटम्स से अटैचमेंट जोड़ना और प्राप्त करना.