Tạo yêu cầu cuộc hẹn bản nháp
Contents
[
Hide
]
Aspose.Email - Tạo Yêu cầu Cuộc hẹn Nháp
Việc tạo một yêu cầu cuộc hẹn ở chế độ nháp có thể hữu ích, để thông tin cơ bản được thêm vào và sau đó nháp cuộc hẹn có thể được chuyển tiếp cho các người dùng khác để họ thay đổi. Aspose.Email cho Java cung cấp khả năng linh hoạt để tạo và lưu cuộc hẹn ở chế độ nháp để sử dụng sau.
Để lưu một cuộc hẹn ở chế độ nháp, thuộc tính Method của lớp Appointment phải được đặt thành 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");
Tải mã đang chạy
Tải xuống Create Draft Appointment Request từ bất kỳ trang web mã nguồn xã hội nào được đề cập dưới đây:
Để biết thêm chi tiết, truy cập Tạo Yêu cầu Cuộc hẹn Nháp.