c# - Outlook : How to get email from Recipient field? -


i'm attempting email address typed to field of compose mail window.

i try address property of recipient, according vs, should give me email.

i instead receiving string looks this:

"/c=us/a=att/p=microsoft/o=finance/ou=purchasing/s=furthur/g=joe" 

how can email address in recipient field?

my code far:

list <string> emails = new list<string>();  if (thismailitem.recipients.count > 0) {     foreach (recipient rec in thismailitem.recipients)     {         emails.add(rec.address);     } } return emails; 

can try ?

emails.add(rec.addressentry.address); 

reference link

edit:

i don't have right environment test i'm guessing this, how about

string email1address = rec.addressentry.getcontact().email1address; 

or .email2adress or .email3address

also there is,

rec.addressentry.getexchangeuser().address 

that might want try.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -