Hi,
If i have a string as “CN=Meimei Cheung/OU=Bsg/O=MetLife/C=US” in this format.So,when i assign this string to MapiCalender to,from property then it will give exception that give valid email address.Is there any other way to assign it.
Hi,
Hi Pooja,
Hi,
Hi Pooja,
Upon further testing, I have found that the string value you have discussed in this example, doesn’t refer to an email address but display name as you can see from the following code sample. Please note that the Email address should be a valid email address with the @ of sign as the appointment object can be used for sending via Smtp or ExchangeClient as well.
Sample Code:
MapiMessage mapiMsg = MapiMessage.FromFile("EMAIL_490222\\LAW_POC-#9745506-v1-Calendar_Entry_Test.msg");
foreach (MapiRecipient r in mapiMsg.Recipients)
{
Console.WriteLine("Display Name: " + r.DisplayName);
Console.WriteLine("Display Email: " + r.EmailAddress);
}
mapiMsg.Save("EMAIL_490222\\Output.msg");
Hi Pooja,