sugeet_s
05-04-2006, 02:19 PM
I tried the following code but it gives exception------> The transport failed to connect to the server.
try
{
MailMessage mail = new MailMessage();
mail.To = "sugeet_sharma@infosys.com";
mail.From = "sugeet_sharma@infosys.com";
mail.BodyFormat = MailFormat.Text;
mail.Subject = "harsh";
mail.Body = "Hi";
SmtpMail.SmtpServer = "172.25.150.7";
SmtpMail.Send(mail);
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
:eek: thanks in advance:thumbsup:
try
{
MailMessage mail = new MailMessage();
mail.To = "sugeet_sharma@infosys.com";
mail.From = "sugeet_sharma@infosys.com";
mail.BodyFormat = MailFormat.Text;
mail.Subject = "harsh";
mail.Body = "Hi";
SmtpMail.SmtpServer = "172.25.150.7";
SmtpMail.Send(mail);
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
:eek: thanks in advance:thumbsup: