Error/Exception: The transport failed to connect to the server.
Reason: if this is occurring while sending mails.
then it can be two reasons
1. you have given wrong smtp address.
2. your smtp server is not running.
type services.msc, all services will be displayed, search for smtp service.
and start it, if its stopped.
Right click on services and check "startup type" if "disabled" selected then select "automatic".
and test it.
if still any problem comment with the proper description.
Exception-The transport failed to connect to the server.