Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C#
private void SendEMail(string emailid, string subject, string body)
{


            MailMessage mailMessage = new MailMessage();

            MailAddress fromAddress = new MailAddress("ikout@ksm.com");

            mailMessage.From = fromAddress;

            mailMessage.To.Add(emailid);

            mailMessage.Body = body;

            mailMessage.IsBodyHtml = true;

            mailMessage.Subject = subject;

            SmtpClient smtpClient = new SmtpClient();
            //smtpClient.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;
            //smtpClient.UseDefaultCredentials = true;
            //smtpClient.EnableSsl = true;
            smtpClient.Host = "192.25.10.89";
            smtpClient.Port = 25;

            smtpClient.Send(mailMessage);


}


i have configured the smtp in my system if i am sending mail that time the .eml stored in my pickup directory but the mail should'nt be received.


please help me what i have to do?
Posted
Updated 1-Mar-14 1:19am
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900