c# - How to get receiver email from a sent email in EWS? -



c# - How to get receiver email from a sent email in EWS? -

i'm looping sent item in ews, , seek show details of each sent emails, receiver, subject, body etc. however, found receiver in sent email message null. how receiver email address? code:

itemid id = (itemid)request["id"]; // id item id of wellknownfoldername.**sentitems** emailmessage current = emailmessage.bind(service, id); la_subject.text = current.subject; la_from.text = current.sender.tostring(); la_sent.text = current.datetimereceived.tostring(); la_to.text = current.receivedby.tostring(); // line error occurs

any idea?

to recipients of mail, utilize displayto , displaycc properties of mail service message.

or iterate through torecipients collection , build string yourself:

var torecipients = string.join(", ", mail.torecipients.select( address => string.format("\"{0}\" <{1}", address.name, address.address)));

the receivedby property used in delegate scenarios. see http://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.emailmessage.receivedby(v=exchg.80).aspx.

c# asp.net ews

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -