Actions
Share

Cannot connect to local SMTP Server on dedicated server


You may receive the following error message on your dedicated server when trying to send a CDO message from your site:

CDO.Message.1 error '80040213'
The transport failed to connect to the server.

...or simply:

error '8004020f'

You may receive similarly worded errors for CDONTS or ASP.NET e-mail attempts.  This usually means that you have not enabled your own server's IP addresses to connect and/or relay through the Virtual SMTP Server in IIS (both are needed). 

If you are using the SMTP server in IIS6 Windows Server 2003:
  1. Go to the Properties for Default SMTP Virtual Server in the IIS console.
  2. Change to the Access tab.
  3. Click the Connection button.
  4. Select "Only the list below", and add the IP addresses for your dedicated server.  Click OK.
  5. Click the Relay button and repeat step #4 above.
  6. Click OK again to close the properties of Default SMTP Virtual Server.

If you are using the SMTP server in IIS7 Windows Server 2008:
    
    1.  Open Server Manager, click on Features on the left-hand side and click "Add Feature" on the right-hand side.



     2.  Scroll down until you see the SMTP Server feature.  Once you click SMTP Server, another window will pop up requesting you to add other features required for SMTP Server.  Click "Add Required Features" and click Next.



    3.  Click "Install".



    4.  The actual installation may take a few minutes, so be patient.  Once you are done, you will see this window.  Click "Close" and you've just installed SMTP on your 2008 Server!




At this point, you can follow the directions for using the SMTP server in IIS6.  First, go to Administrative Tools and open IIS 6.0 Manager:

   



    1.  Go to Properties of the Default SMTP Virtual Server in the IIS console.



    2.  Change to the Access Tab.





    3.  Click the Connection button.



    4.  Select Only the list below, and add the IP addresses for your dedicated server.  Click OK.



    5.  Click the Relay button and repeat step #4 above.



    6.  Click OK again to close the properties of Default SMTP Virtual Server.

Refer to your vendor documentation if you are using an alternate SMTP Server service (not IIS SMTP) on your dedicated server.  For sample code to test it, check out the following knowledgebase article:

    Send e-mail programmatically using CDO
    https://help.maximumasp.com/SmarterTicket/Customer/KBArticle.aspx?articleid=788


Article ID: 393, Created On: 9/7/2005, Modified: 2/22/2010

Feedback (0)