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 |
1.What is the major advantage of polymorphism? Please don't simply say binding. Specify any other reason.
What is strong name?
What is msil, il?
Why SOAP is required?
Is there any inbuilt tool or command provided by .NET to view the code inside the assembly?
What is the use of common language runtime?
What is .NET Framework?
What tags do you need to add within the asp:datagrid tags to bind columns manually.
Can you write a class without specifying namespace?
What is garbage collection? Explain the difference between garbage collections in .net 4.0 and earlier versions?
Explain the use of activex control in .net?
What are the new features in .net core?