Hi,
As per the documentation / forum discussions, for setting an custom ItemProperties for Outlook items, we need to add Headers to the Aspose.Email.Mail.MailItem.
But after setting the headers and sending it through the SmtpClient, when we receive the meeting in Outlook, we are not able to get the item properties.
Please let us know where can we find this or how can we set the ItemProperties.
Hi Kashif,
Thanks for the reply.
We wanted to know whether we can set some hidden/Custom properties into ASPOSE MailItem so that it can be retrieved from Outlook. We tried adding headers to the Aspose.Email.Mail.MailItem but couldn't retreive it in Outlook. Please let us know if there are any other possibilities.
Hi Deivarayan,
Thank you for clarification.
Aspose.Email does allow setting a custom header while sending an appointment, and these are visible in outlook if the appointment’s properties are checked in Outlook. However, it seems that you want to retrieve the sent appointment (through Aspose) using Outlook Interop. and facing some issue. Please confirm if I am right here?
Using the following code via Aspose API, I found this working when the sent appointment message’s properties are viewed in outlook.
Sample Code:
// create the meeting request
Appointment app = new Appointment("meeting request", DateTime.Now.AddMinutes(15), DateTime.Now.AddMinutes(30), "organizer@gmail.com", "attendee@aspose.com");
app.Summary = "meeting request summary";
app.Description = "description";
MailMessage msg = new MailMessage();
msg.From = "organizer@gmail.com";
msg.To = "attenedee@aspose.com";
msg.IsBodyHtml = true;
msg.HtmlBody = "HTML Heading Email Message detail";
msg.Subject = "meeting request";
msg.AddAlternateView(app.RequestApointment(0));
msg.Headers.Add("Secret-Header", "Test");
// send the appointment
SmtpClient client = GetSmtpClient();
client.Send(msg);