Using CDONTS and SMTP with a netgear firewall

Posted on 2006-05-15
Last Modified: 2013-11-16
I am running multiple website on a server running iis 6.0. The sites all use CDONTS to send mail using SMTP. The server is configured as an SMTP server and has a static IP address. Everything was working fine untill I added a netgear firewall (FVX538). Now I just can't send mail. It does get added to the mail queue but then never gets sent. Iv've opened up port 25 and routed it to the box. Is there anything I'm missing or need to do?

Question by:philipmcrouch
    LVL 18

    Accepted Solution


    You are using window 2000 server or higher you can also try with the following code if you are using window 2003 server

    Use following code for CDOSYS Email componets.
    Set cdoConfig = Server.CreateObject("CDO.Configuration")
    cdoConfig.Fields.Item(sch & "sendusing") = 2
    cdoConfig.Fields.Item(sch & "smtpserver") = ""
    Set cdoMessage = Server.CreateObject("CDO.Message")
    Set cdoMessage.Configuration = cdoConfig
    cdoMessage.From =
    cdoMessage.To = "" = ""
    cdoMessage.Subject = "enquiry form CDOSYS componets"
    cdoMessage.HTMLBody = "your text"
    Set cdoMessage = Nothing
    Set cdoConfig = Nothing
    response.redirect= ""

    CDONTs is no longer supported on Windows 2003 server.  Microsoft   introduced CDO/CDOSYS back several years ago to replace CDONTs.
    You will need to convert your code to use CDO/CDOSYS.Sample code for CDO can be found in article "How to use CDOSYS Email?"


    01. <%
    02. Dim objCDOMail
    03. Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
    04. objCDOMail.From = ""
    05. objCDOMail.To = ""
    06. objCDOMail.Cc = ""
    07. objCDOMail.Bcc = ""
    08. objCDOMail.Subject = "Subject"
    09. objCDOMail.BodyFormat = 0
    10. objCDOMail.MailFormat = 0
    11. objCDOMail.Body = "MailBody"
    12. objCDOMail.Importance = 1
    13. objCDOMail.Send
    14. Set objCDOMail = Nothing
    15. %>
    Explanation According to Line
    01. Open ASP tag
    02. Declare a variable named objCDOMail
    03. Create instance of Mailer control
    04. Set Mailer control properties and collection items
    05. Set Mailer control properties and collection items
    06. Set Mailer control properties and collection items
    07. Set Mailer control properties and collection items
    08. Set Mailer control properties and collection items
    09. Set Mailer control properties and collection items
    10. Set Mailer control properties and collection items
    11. Set Mailer control properties and collection items
    12. Set Mailer control properties and collection items
    13. Send Mail
    14. Release resources
    15. Close ASP tag
    LVL 18

    Expert Comment

    by:Sam Panwar

    also open port 445 port then try its working or not.

    This is your firewall problem and you can just check it throough the following

    You may perform the following test to confirm the SMTP server is online and responding:
    1. Start > Run > cmd (WinNT/XP/2003) or Start > Run > command (Win95/98)
    2. Type command: telnet 25 (Example as below)

    c:\telnet 25
    Connecting To;

    You should receive some response as below:

    220- ESMTP Exim 4.50 #1 Tue, 21 Jun 2005 07:30:42 +0800
    220-We do not authorize the use of this system to transport unsolicited,
    220 and/or bulk e-mail.&#65533;

    The message confirmed that the SMTP server is working properly.
    LVL 26

    Assisted Solution

    by:Leon Fester
    The above is 100% correct, however iis 6.0 is installable without Windows 2003 i.e. can be installed on Win2K and WinXP, and CDONTS can be installed on Windows 2003.

    If your mail is being formed and you've opened your ports on the firewall correctly...then firstly look at your SMTP logfiles that IIS creates. It should give you at least an error from the SMTP server.

    Lastly, try sending to a local email address that does not need to travel via the firewall...this should allow you to test local sending without accessing the firewall.

    If this fails, then restart your SMTP server in  IIS.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    The DROP (Spamhaus Don't Route Or Peer List) is a small list of IP address ranges that have been stolen or hijacked from their rightful owners. The DROP list is not a DNS based list.  It is designed to be downloaded as a file, with primary intention…
    ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
    After creating this article (, I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now