Try This..
SmtpClient LocalClient = new SmtpClient();
MailMessage Mail = new MailMessage();
Mail.To.Add("ToEmail");
Mail.From = new MailAddress("fromEmail");
Mail.Body = "Test Message";
Mail.Subject = "Mail Local";
LocalClient.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;
LocalClient.Credentials = new NetworkCredential("fromEmail", "Password");
LocalClient.Send(Mail);