How to send the Mail in C# using ASP.Net ? And my Answer is
as follows ?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / satya narayan sahoo
You can try using any other SMTP sevrer's IP in ur network.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / rajesh
hi
i used the same code & not getting any error but not i am
not getting mail.
could u plz help me ?
Is This Answer Correct ? | 0 Yes | 0 No |
What is the difference between encrypting a password and applying a hashing?
Explain me what are the deferred execution and the immediate execution in linq?
Difference b/w dataset.clone and dataset.copy ?
How is threading done in .net?
What is use of ContextUtil class?
Dynamic Fonts
Explain different types of cookies in .NET?
What is JIT and how is works?
Write code for fetch record nos 15 to 25 from a dataset containing 50 records?
Why you want to leave your previous company.
How is .net core cross platform?
Please explain what garbage collection is and how it works. Provide a code example of how you can enforce garbage collection in .net?