Click here to Skip to main content
15,030,240 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Is there any way so that we can directly connect to Microsoft Exchange Server and will compose and send Emails from the Microsoft office outlook 14.0 without using SMTP.If possible provide me the sample code also .
Thanks in advance.
Posted
Comments
Herman<T>.Instance 7-May-12 10:29am
   
Reason for my vote of 1
use google.com to search. There are enough leads to help you out with this

Yes, you use the Exchange Web Services. See here.[^]
   
Comments
Sandeep Mewara 8-May-12 11:57am
   
5!
C#
public void SendEmail()
        {
            try
            {
                ExchangeService service = new ExchangeService();
                service.AutodiscoverUrl("*****@*****.com");
                EmailMessage message = new EmailMessage(service);
                message.Subject = "Test Email";
                //message.Body = "Test Email body";
                message.Body = "This is an autogenerated Email so please do not reply to this email.This Email is generated to send test email from exchange server.";
                message.ToRecipients.Add("****@*****.com");
               
                message.Save();
                message.SendAndSaveCopy();
            }
            catch (Exception ex)
            {
                throw ex;
            }

        }
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900