0

I have already asked the same question (& also found the solution) but for higher version i.e. Exchange Server 2007. There I could use EWS and web services API for getting my objective done.

I want to know how to send mails using Microsoft Exchange Server 2003, in Asp.net, where EWS is not supported.

Please throw some light. THNX

This is the code I'm using:

        MailMessage mail = new MailMessage();

        //set the addresses
        mail.From = new MailAddress("alexander.kings@company.com");
        mail.To.Add("alexander.kingsu@company.com");

        //set the content
        mail.Subject = "This is an email";
        mail.Body = "this is a sample body";

        //send the message
        //SmtpClient smtp = new SmtpClient("sytem ip address");
        SmtpClient smtp = new SmtpClient("UK-BIR-MAIL1.corp.company.com");
        //smtp.Credentials = new NetworkCredential("corp\alexkings", "password");

        smtp.UseDefaultCredentials = true;
        smtp.Send(mail);
Kings
  • 1,551
  • 12
  • 32
  • 52

0 Answers0