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

What is dot net architecture?

1012


What is meant by globalization and localization?

1007


Explain Different kinds of methods?

2059


Explain me why do we use msmq?

999


What is deferred execution vs. Immediate execution in linq?

1006


What is your observations between vb.net and vc#.net?

1081


Explain re-clarification of object based in .net?

962


What is difference between .net and .net core?

978


Tell us why do we use the “using” statement?

990


Explain what is immutability, what is it for and how is it codified?

1043


What is the difference between encrypting a password and applying a hashing?

1135


I'm having some trouble with cas. How can I troubleshoot the problem?

973


Explain what is the reason of occurring overflow-underflow arithmetic exception error, it shows error message when we run our program by adding control?

1075


what is machine key error in .NET how can we solve it?

2563


What is WSDL? Explain its architecture?

1143