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 |
Which server tag comes from server when we submit any data
What are the contents of assembly?
What is managed code and managed data in .net?
what are connection strings?
Describe the difference between inline and code behind which is best in a loosely coupled solution?
How to prepare parametrized (with more than one parameters) crystal report.pls tell me the code procedure, if any body can?
What is finalize method in .net?
Explain what does managed mean in the .net context?
How can you see which services are running on a Windows box?
What are the two kinds of properties.
How do you view the methods and members of a dll?
Tell us what is heap and what is stack?