cjr

I am currently sending email from my C# windows application using System.Net.Mail by creating a SmtpClient.

However, I am being asked to use the Exchange Mail Server's "User names" instead of the actual email addresses. The SmtpClient method of sending mail does not seem to be able to do this.

I am told that another developer working with another language and development environment can do this. I asked him how and he said he uses MAPI.

Are there any built-in classes in DotNet for C# to use MAPI

My goal is to pass the mail server the user names instead of the actual email addresses.

Any help or direction is appreciated!



Re: Visual C# Language MAPI in C# ?

Figo Fei - MSFT

Hi, cjr

Here is some useful info about it : http://g8.cx/mapi/

Thanks






Re: Visual C# Language MAPI in C# ?

cjr

Thanks for the information.

Before posting I had run across this API in research of a resolution. After all is said and done, I guess this API is the most stable and simple to use. I was hoping that maybe Dotnet had some built-in classes but it looks as though I would need to reference the Outlook library which then requires a reference to a Microsoft Core Library. Seems too convoluted.

Anyway, thanks!





Re: Visual C# Language MAPI in C# ?

Ross Dargan

Another possible solution would be to use active directory to find the users email address. Personally I hate MAPI - had loads of issues with it, System.Mail.Net is they way I would go!

Ross Dargan (blog.the-dargans.co.uk)