hi,
i wish to sending mail in asp.net from local host.when i send the mail.Message sending failed error will occur,how can i solve this
Thanks
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
ShankeyRank #972 · 2.1K reputationPosted Feb 10, 2011, 2:14 AM EST
I think you must have some local smtp settings, again which should be configured in web.app of the application like below,
Suthish NairRank #92 · 22.8K reputationPosted Feb 10, 2011, 3:12 AM EST
Your localhost system needs to configured to that.
krithika muthukrishnanRank #8,369 · 223 reputationPosted Feb 10, 2011, 8:24 PM EST
Now i successfully send my mail,but after i send the mail when i am going to see the mail there is no message is received in my inbox,i dont know what the mistake was,can anyone tell me the solution.
thanks,
Suthish NairRank #92 · 22.8K reputationPosted Feb 10, 2011, 10:29 PM EST
krithika muthukrishnanRank #8,369 · 223 reputationPosted Feb 10, 2011, 10:43 PM EST
hi,
here i create the object to smtpclient for sending the mail used by system.net.mail namespace.
System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
message.From = new MailAddress(from);
message.To.Add(to);
message.Subject = subject;
message.Body = body;
//create an object for smtp cliend used to sending the mail
SmtpClient smtp = new SmtpClient("192.168.1.117");
smtp.Send(message);
Suthish NairRank #92 · 22.8K reputationPosted Feb 11, 2011, 12:24 AM EST
Also, did you configured mailing server client on you system through IIS.