Roopesh mk

Roopesh mk

  • NA
  • 21
  • 0

Transport failed to connect the server

Oct 21 2009 2:22 AM

                                             I am using ASP.NET Application to send email from application. I specified SMTP Address. But still it shows transport failed to connect to the server.
Here is my code:
MailMessage
objMail = new MailMessage();//mail message object to send email
objMail.From = fromeID;//geting from id
objMail.To = toAddress;
objMail.Cc = "";//cc=null
objMail.Bcc = "";//Bcc=null
objMail.Subject = subject;//subject
objMail.Body = contents;//assigning body of the message
objMail.BodyFormat = MailFormat.Text;//mail format is a text
objMail.Priority = MailPriority.High;//seting the priority is high
SmtpMail.SmtpServer = ConfigurationSettings.AppSettings["Mailserver_IP"].ToString();//geting mail server ip from web.config file
SmtpMail.Send(objMail);//sending the mail
please Replay ASAP
 
 

Answers (1)