Retrieving email using Exchange Web Services problem

Hi,

After connecting to exchange and filter the emails

ExchangeService ews = new ExchangeService(ExchangeVersion.Exchange2013_SP1);

foreach (EmailMessage message in unreadMessages)
{
message.Load();
string temp = message.Subject;
}

the strange thing is that my email subject is not the one that is send for example, if i send a email with the subject DEMO|502|Marcio|20150909|10|100 when i do message.Subject it returns DEMO|502|Marcio|20150909|10|001
When i split the message.Subject string by the | and try to convert the last string to int32 it gives a error saying that it cant convert.

When i convert the subject to charArray i get an extra char between the last "1" and "00", unicode 8207, an right to left mark.

Is there any way to remove this and get the correct subject (DEMO|502|Marcio|20150909|10|100). 

Best Regards, Pedro Soeiro.

  • Moved by CoolDadTxMVP 14 hours 28 minutes ago Exchange related
September 11th, 2015 7:04am

The below forum is where you need to post.

https://social.msdn.microsoft.com/Forums/Lync/en-US/home?category=exchangeserver

Free Windows Admin Tool Kit Click here and download it now
September 11th, 2015 11:39am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics