|
|
Question : COMException (0x80040213): The transport failed to connect to the server.
|
|
Hi experts,
Please help ...
My environment: Windows 2003, IIS wiuth ASP.Net and C#, set up authentication with SMTP server
I use ASP.Net with C# and call CDO.dll to send mail via SMTP server, and this error shows out.
The transport failed to connect to the server. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: The transport failed to connect to the server.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[COMException (0x80040213): The transport failed to connect to the server.] SendMail(String strFrom, String strTo, String strSubject, String content)
Would someone give me some ideas to solve this error. 1. I am sure that the user name in strFrom is valid to this SMTP server. 2. let me know what other info you would like to know.
Thanks in advance.
Edward
|
Answer : COMException (0x80040213): The transport failed to connect to the server.
|
|
Hi Ed,
A couple of things:
- Make sure that the user you are logged in as has permission to mail out. You can also try to manually mail out via smtp using telnet and see if you are able to get that far. - Re-Verify all mail settings and make sure that you are using SMTP authentication if your server setup requires it. - If you are referencing localhost in your code to connect to your mail server, try connecting instead as 127.0.0.1, perhaps there may be some funky DNS issue or bug there?
Bob
|
|
|
|
|