Click here to Skip to main content
12,305,151 members (73,386 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# ASP.NET ASP.NET4
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 7-May-12 3:57am
Comments
digimanus 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
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Yes, you use the Exchange Web Services. See here.[^]
  Permalink  
Comments
Sandeep Mewara 8-May-12 11:57am
   
5!
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

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;
            }
 
        }
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160530.1 | Last Updated 17 Sep 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100