VB 6.0 - SMTP Error - Asked By Rusty on 01-Dec-11 05:38 PM

I am using Microsoft CDO for Windows 2000 Library to send SMTP messages with success in a VB 6 compiler. Once I compile into an executable however, I get a runtime error -2147220973 (80040213) The transport failed to connect to the server.

Has anyone seen this issue?
Riley K replied to Rusty on 01-Dec-11 08:48 PM

Check to be sure the server System.Web.Mail is executing on can connect to the mail server. Some times firewalls or proxy servers can get in the way.

Try specifying the value by IP address. Poor DNS resolution can sometimes hinder name lookups.
Make sure the that the mail server is running at port 25.

If you did not specify a SmtpMail.SmtpServer property, or if SmtpMail.SmtpServer points to "localhost" (or the equivalent), be sure the SMTP Service is running on port 25.

For testing purposes change the MailMessage.From and MailMessage.To properties to an address that exists on SmtpMail.SmtpServer. Some times this exception is thrown, when it really is a relay issue.

Rusty replied to Riley K on 02-Dec-11 09:07 AM
This works in the VB 6 compiler just fine, I am unable to understand why this will not work when I complile it into an EXE. How does VB 6 store the DLL rescource when it compiles it? I have verified that the DLL indeed exists.