We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Outlook Appointment

Is it possible to track attendee status (e.g. Accepted, Declined) in Outlook appointments created using Aspoe.Email?

Hi Paul,

Please have a look at the following code that performs similar operation as your requirements.You may need to include some checks as per your requirements. Please let us know if you feel any difficulty or have any other inquiry in this regard.

Sample Code:

static void ReadAppointmentReplies()
{
ImapClient client = new ImapClient(“exchange.domain.com”, 993, “user”, “passord”);

// set the security mode to explicit
client.SecurityMode = ImapSslSecurityMode.Implicit;

// enable SSL
client.EnableSsl = true;

// connect to imap server and login
client.Connect(true);
client.SelectFolder(“Inbox”);

// Set conditions
ImapQueryBuilder builder = new ImapQueryBuilder();

// Subject contains “Accepted:”
builder.Subject.Contains(“Accepted:”);

// Build the query
MailQuery query = builder.GetQuery();
ImapMessageInfoCollection msgCollection = client.ListMessages(query);
foreach (ImapMessageInfo info in msgCollection)
{
//Fetch Message
Aspose.Email.Mail.MailMessage msg = client.FetchMessage(info.UniqueId);
foreach (AlternateView alterView in msg.AlternateViews)
{
if (alterView.ContentType.MediaType == “text/calendar”)
{
//Extract calender as appointment
Appointment app = Appointment.Load(alterView.ContentStream);
Console.WriteLine("Appointment unique id = " + app.UniqueId);
}
}
}
}