title: Send mails using EXCHANGE SERVER (Microsoft Outlook web access)in asp.net
body: <p>I know how to send mails using outlook installed in same machine, where I'm running my code. 
  Now, the requirement here is to access exchange server (Microsoft OWA) of my organization for sending mails in asp.net code.</p>
  
  <p>Is it possible? If yes, then plz throw some light.</p>
  
  <p>Thnx</p>
  
  <p><em><strong>UPDATE</em></strong></p>
  
  <p><strong>Got the Solution. Posting my working code here for any one who wants help. happy coding !</strong></p>
  
  <pre><code>protected void Button1_Click(object sender, EventArgs e)
  {
       ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
      //service.AutodiscoverUrl("youremailaddress@yourdomain.com");
  
      service.Url = new Uri("https://yourwebmailaddress.com/ews/Exchange.asmx");
  
      service.UseDefaultCredentials = true;
      //service.Credentials = new WebCredentials("username", "password");
  
  
      EmailMessage message = new EmailMessage(service);
      message.Subject = "My auto mail from exchange server";
      message.Body = "hi everyone !";
      message.ToRecipients.Add("brad.pitt@hollywood.com");
      message.Save();
  
      message.SendAndSaveCopy();
  
      Label1.Text = "Success !";    
  }
  </code></pre>
  
  <p><strong>Another Question:</strong> How to use microsoft exchange 2003 ?? 'coz EWS is not supported in there. Please update any idea...?</p>