Im developing a Tickets System. I need to send a Ticket(mail) to a EmailAddressList and receive the answers by email regarding to this Email/Ticket. Is there anyway to get an I
Make sure that when you send your messages that you use SendAndSaveCopy()
to place a copy of the message in the SentItems folder. Then you will want to use the FindItems()
method to look for messages in the WellKnownFolderName.SentItems
, instantiate an EmailMessage
object and then you can look at the InternetMessageId
property. Here is a brief example:
ItemView view = new ItemView(10);
view.PropertySet = new PropertySet(BasePropertySet.IdOnly, EmailMessageSchema.InternetMessageId);
FindItemsResults- results = service.FindItems(WellKnownFolderName.SentItems, view);
foreach (Item item in results)
{
if (item is EmailMessage)
{
EmailMessage msg = item as EmailMessage;
Console.WriteLine(msg.InternetMessageId);
}
}
Here are a couple of links that may help you further:
How to: Send email messages by using EWS in Exchange
EmailMessage members