Hi,
I have a requirement where i need to send mail from my application. I used the following code to send mail
MailMessage msgMail = new MailMessage();
MailAddress fromAdress = new MailAddress("praveen.k@gmail.com","Mechano");
msgMail.From = fromAdress;
msgMail.To.Add("praveen@gmail.com");
msgMail.Subject = "Issue on Website";
msgMail.IsBodyHtml = true;
//msgMail.BodyFormat = MailFormat.Html;
string strBody = "This is test message";
msgMail.Body = strBody;
SmtpClient sClient = new SmtpClient("127.0.0.1", 25);
//sClient.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;
sClient.Send(msgMail);
The above code is neither working in my local system not showing error, but after the application has deployed in remote server(this is shared server) the code is working. What might be the problem?
Thanks
Praveen
View Complete Post