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 |
can any one tel me the complete Testing Procedure of any one simple PROJECT i mean either web/windows based application?
What is a strategy pattern? Implement it.
What is CLR, CLS,CTS
4 Answers Deloitte, Vee Technologies,
What is Assembly manifest? what all details the assembly manifest will contain.
What are the two main parts of the .net framework?
Explain what rare the types of jit and what is econo-jit?
What are the contents of assembly?
What are the differences between com architecture and.net architecture?
Which namespace does it belong to by default?
Can we Classic ASP,.Net 1.0, .Net 1.x and .Net 2.0 installed on the same system?
Is there built-in support for logging?
What is the difference between task and thread in .net?