Click here to Skip to main content
Sign Up to vote bad
good
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:57

Comments
digimanus - 7 May '12 - 10:29
Reason for my vote of 1 use google.com to search. There are enough leads to help you out with this

2 solutions

Yes, you use the Exchange Web Services. See here.[^]
  Permalink  
Comments
Sandeep Mewara - 8 May '12 - 11:57
5!
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
Your Filters
Interested
Ignored
     
0 OriginalGriff 273
1 Sergey Alexandrovich Kryukov 179
2 Maciej Los 136
3 Richard MacCutchan 125
4 Tadit Dash 100
0 Sergey Alexandrovich Kryukov 10,264
1 OriginalGriff 7,917
2 CPallini 4,181
3 Rohan Leuva 3,522
4 Maciej Los 3,125


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