Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Interop / April 2005

Tip: Looking for answers? Try searching our database.

Email Alias Not resolving

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jayanthi - 23 Sep 2004 10:49 GMT
Hi,
  Our Project is a .Net windows application developed in C#. We have a
requirement in our project where we get the sender’s email address from teh
email message using the following code.
(string)olMailItem.get_Fields((int) 0x0C1F001E)

But we get the address as /O=ABCD/OU=ITLSHL/CN=RECIPIENTS/CN=Jayanthi_t and
not jayanthi_t@abcd.com

Please let us not how we can get the smtp address in .Net
Ken Slovak - [MVP - Outlook] - 23 Sep 2004 14:45 GMT
PR_SENDER_EMAIL_ADDRESS will give you the Exchange distinguished name if
sent within an Exchange organization, which is what you are seeing.

PR_SMTP_ADDRESS (0x39FE001E) has that information, but it's only available
for Recipient objects. So you are going to have to get the sender name, look
up that name in the Exchange GAL and then use
Outlook.NameSpace.CreateRecipient(name) to create a Recipient object, then
get that object in whatever other API or object model you are using and read
the PR_SMTP_ADDRESS field from that Recipient object. An alternative is to
create a dummy email, add that name to the Recipients collection of the
email, resolve the Recipient and then read the PR_SMTP_ADDRESS field.

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> Hi,
>    Our Project is a .Net windows application developed in C#. We have a
> requirement in our project where we get the sender's email address from
teh
> email message using the following code.
> (string)olMailItem.get_Fields((int) 0x0C1F001E)
[quoted text clipped - 3 lines]
>
> Please let us not how we can get the smtp address in .Net
Suresh Kalimuthu - 07 Apr 2005 18:06 GMT
Hi Ken,

I implemented as you said using the name to resolve to get the recipient
object. Unfortunately the name exists twice and "Check Names" dialog pop up
comes. So now used has to choose the correct recipient.

So what i tried was,
used the Exchange distinguished name to filter the Active Directory for
proxyaddresses property. I got the exact alais for all possible
proxyaddresses (taken from outlook properties for the recipient). But I am
assuming  PR_SENDER_EMAIL_ADDRESS(0x39FE001E) will always return
/O=ABCD/OU=ITLSHL/CN=RECIPIENTS/CN=abcd
and i am appending X500: to it and filtering the AD.

I want to know whether my assumption is correct.

Thanks
Suresh
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.