Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to send the Mail in C# using ASP.Net ? And my Answer is
as follows ?

Answer Posted / sharifuddin

MailMessage mail = new MailMessage();
mail.To = txtto.Text;
mail.From = txtfrom.Text;
mail.Subject = txtsub.Text;
mail.Body = txtmsg.Text;
mail.Priority = MailPriority.High;
SmtpMail.SmtpServer =

SmtpMail.SmtpServer.ToString();
try
{
SmtpMail.Send(mail);

Label6.Text = " Message sent Succesfully....";
}
catch (Exception ex)
{
Label5.Text = "";
Label6.Text = " Message sent Failed.. " +
ex.Message;
}

But The When I sent it gives the error as :"The transport
failed to connect to the server."

Could you please help me....?


Thank you..
me.sharifuddin@gmail.com

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Please explain what is reflection and what is it for?

927


What do you mean by web service?

1280


What is the use of immutability?

1083


hai, about trading domain and need simple project on trading system. please help me...

2060


What is a windows process in .net?

1054


Please explain what do the terms “boxing” and “unboxing” mean?

1006


Is .net is a language?

1112


Explain what are the deferred execution and the immediate execution in linq?

1034


How does linq work?

1025


Explain security measures exist for .net remoting in system.runtime.remoting?

1017


Tell us what is json data, and what is one way that .net developers can work with json?

967


Describe the difference between inline and code behind which is best in a loosely coupled solution?

2797


What is func in .net 3.5?

987


What is the use com component in .net?

971


What is new in .net core?

915