By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,963 Members | 1,778 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,963 IT Pros & Developers. It's quick & easy.

Transport Failed to connect to the Server.

P: n/a
When i am trying to send in asp.net i am geting this Error
Message:Transport Failed to connect to the Server. I am using SMTP
server in my localMachine and Sify connction
I am New to ASP.Net
MY Code:
private void Button1_Click(object sender, System.EventArgs e)
{
MailMessage mail = new MailMessage();
mail.To=Request.Form["to"];
mail.From =Request.Form ["from"];
if (Request.Form["format"].Equals("text"))
mail.BodyFormat = MailFormat.Text;
else
mail.BodyFormat = MailFormat.Html;
mail.Subject =Request.Form["subject"];
mail.Body = Request.Form["body"];
SmtpMail.SmtpServer="asmtp.sifybroadband.com";
SmtpMail.Send(mail);
Response.Flush();
Message.Text="Message Sent....<br><br>"+
"<a href=\"sendMail.aspx\">Go Back</A>";

}
Error Shows in this line SmtpMail.Send(mail);

Dec 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi,

see this:

http://www.systemwebmail.com/faq/4.3.9.aspx

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
"Sudhan" <jr*******@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
When i am trying to send in asp.net i am geting this Error
Message:Transport Failed to connect to the Server. I am using SMTP
server in my localMachine and Sify connction
I am New to ASP.Net
MY Code:
private void Button1_Click(object sender, System.EventArgs e)
{
MailMessage mail = new MailMessage();
mail.To=Request.Form["to"];
mail.From =Request.Form ["from"];
if (Request.Form["format"].Equals("text"))
mail.BodyFormat = MailFormat.Text;
else
mail.BodyFormat = MailFormat.Html;
mail.Subject =Request.Form["subject"];
mail.Body = Request.Form["body"];
SmtpMail.SmtpServer="asmtp.sifybroadband.com";
SmtpMail.Send(mail);
Response.Flush();
Message.Text="Message Sent....<br><br>"+
"<a href=\"sendMail.aspx\">Go Back</A>";

}
Error Shows in this line SmtpMail.Send(mail);

Dec 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.