title: Getting the Internet e-mail address from an Exchange Outlook Contact programmatically?
body: <p>I’m trying to read out the Internet formatted address from an Exchange connected Outlook. I read all contacts from the Outlook Contacts, i.e. not from the Global Address Book (GAB), and the problem is that for all users that are stored in Contacts from the Exchange GAB I’ve only managed to read out the X.500 formatted address which is not useful in this case. For all manually added contacts that are not in the domain of the Exchange server, the Internet address is exported as expected.</p>
  
  <p>Basically I’ve used the following code snippet to enumerate the Contacts:</p>
  
  <pre class="lang-cs prettyprint-override"><code>static void Main(string[] args)
  {
      var outlookApplication = new Application();
      NameSpace mapiNamespace = outlookApplication.GetNamespace("MAPI");
      MAPIFolder contacts = mapiNamespace.GetDefaultFolder(OlDefaultFolders.olFolderContacts);
  
      for (int i = 1; i &lt; contacts.Items.Count + 1; i++)
      {
          try
          {
              ContactItem contact = (ContactItem)contacts.Items[i];
              Console.WriteLine(contact.FullName);
              Console.WriteLine(contact.Email1Address);
              Console.WriteLine(contact.Email2Address);
              Console.WriteLine(contact.Email3Address);
              Console.WriteLine();
          }
          catch (System.Exception e) { }
      }
      Console.Read();
  }
  </code></pre>
  
  <p>Is there any way to extract the Internet address instead of the X.500?</p>