Greyware Automation Products, Inc.
Greyware Automation Products, Inc.   
     Home    Products    Store    Downloads    Customer Service    Site Search    
Log in  or   Create an account now -- FREE!        
Kb > Knowledgebase Article KB1001.011

KB1001.011
Problem: When you try to send email using Comments, you receive one of several error messages on the browser or in the comments.log file.

This article applies to Comments.

Last Updated: 31 August 2003

Problem

    When you try to send email using Comments, you receive one of these error messages on the browser or in the comments.log file:

    • Failed to create new socket. This represents a system problem. Host {hostname} was not contacted.
    • Unable to connect to {hostname} to send SMTP mail.
    • Unexpected response to connect.
    • Unexpected response to HELO.
    • Unexpected response to MAIL FROM.
    • SMTP host rejected one or more addresses.
    • Unexpected response to DATA.
    • Unexpected response to DATA after sending letter.

Details

    Comments uses the SMTP host you specify during setup (or by editing the registry) for sending email. In order to do this, it must be able to create a TCP/IP socket and connect to the SMTP host's port 25 TCP.

    If you are experiencing a problem with Comments sending email, you should turn on debugging to find out the exact nature of the error. Debugging is enabled by adding the line

      <input type=hidden name=debug value=yes>

    to your form's HTML. When debuggging is enabled, Comments will write a transaction history to the file comments.log showing each conversation with the SMTP host from beginning to end. The comments.log file may be found either in your ConfigDir folder or the same directory as comments.exe.

    Most of the errors you see will be related to SMTP host configuration problems or general network connectivity problems. These problems must be addressed by your system administrator or firewall administrator before Comments will be able to send email.

Solutions

    Each error message below is followed by an explanation of how to address the problem.

    • Failed to create new socket. This represents a system problem. Host {hostname} was not contacted.
      Your machine's TCP/IP stack is depleted or corrupt, and Comments cannot create a socket for the outbound connection. This message should never be encountered in ordinary circumstances. It indicates that either your operating system requires a patch or that another process is consuming all available sockets. Check with Microsoft to make sure you have the most current service packs and security patches applied. Check to make sure you do not have any viruses or trojans on the machine. Check with the vendors for whatever other programs you are running for problems related to memory leaks or known TCP/IP issues.

    • Unable to connect to {hostname} to send SMTP mail.
      This error occurs when Comments is able to create a socket, but not connect to the SMTP host in order to send the email. Check the comments.log file for specific error messages. Normally, this problem is caused by setting the SMTP host to an invalid or unreachable IP number, or by setting the SMTP host to a DNS name (such as mailhost.myorg.com) when your server cannot look up the corresponding IP number. Test by pinging the SMTP host you have defined. If you can ping the host, try telnetting to the host's port 25. This problem can also be caused by having a firewall (personal or corporate) between your server and the SMTP host that does not allow outbound traffic to the SMTP host's port 25 TCP.

    • Unexpected response to connect.
      This error indicates that the SMTP host allowed the connection, but provided an invalid or unacceptable response. Check the comments.log file to see what Comments was expecting and what was received instead.

    • Unexpected response to HELO.
      This error indicates that the SMTP host provided an invalid or unacceptable response to the HELO command. Check the comments.log file to see what Comments was expecting and what was received instead.

    • Unexpected response to MAIL FROM.
    • SMTP host rejected one or more addresses.
      These two messages indicate that the SMTP host has anti-spam measures installed and you are violating the rules set up by the SMTP host's administrator. In most cases, the problem is caused by third-party relay, or trying to send email from Domain A to Domain B using Domain C as a relay agent. This is similar to asking Federal Express to deliver your UPS package. An email address that lives at the same domain as the SMTP host is called a local address. An email address elsewhere is called a foreign address.

      For example, if your SMTP host is mailhost.jetsons.com and you are trying to send email from fred@flintstones.com to frodo@hobbiton.gov, the SMTP host will probably reject the email because neither flintstones.com nor hobbiton.gov are local to jetsons.com. Most SMTP hosts require that the email either be from someone local or to someone local, or both.

      You can encounter this problem unexpectedly if you are allowing visitors to specify their own email addresses on your form. If most of your visitors are local, the form will work for them; however, when someone stops by whose email address is foreign, the server will not allow the email.

      The best solution is to ensure that the recipient (the MAILTO address specified in your HTML form) is local to the SMTP host. This way, no matter what email address the visitor enters as the EMAIL field (used for the MAIL FROM command when Comments talks to the SMTP host), at least one of the addresses will be local, and the SMTP server will allow the email.

      In some cases, this is insufficient because the SMTP host may maintain a "blacklist," or list of domains from which it will not accept email at all. If the visitor specifies an address in a domain that is blacklisted, the SMTPHost will reject the email even if the recipient is local. In these cases, you must change the HTML form so that the visitor cannot specify the EMAIL field. For example, if your form current has

        Your Email Address: <input type=text name=email>

      you can change it to

        Your Email Address: <input type=text name=visitoremail>
        <input type=hidden name=email value="george@jetsons.com">

      This forces Comments to use george@jetsons.com as the email address used for the MAIL FROM when talking to the SMTP host, but still allows the visitor to give you an email address. The drawback to this method is that the recipient will not be able to reply to the email and have it go to the visitor. Since the sender's address will always be what you have specified in the hidden email field, a reply will always go to that address. The recipient will have to scan the email to find what the visitor specified for the visitoremail field and manually reply to that address instead.

      The last solution is to reconfigure the SMTP host to allow mail from anywhere to anywhere. This is not a good option because it leaves the SMTP host open to hijackers for sending spam. Most SMTP host administrators will not allow this, with very good reason. SMTP hosts that allow third-party relay quickly get added to blacklists around the world.

      N.B. You may also encounter this problem if you are letting the visitor specify the EMAIL field, but the visitor supplies an address like aaa or sdjfjdfj@sfjdjff (i.e., a nonsense address). Most SMTP hosts treat incomplete or invalid email addresses as errors. The comments.log file will show the SMTP host's response in these cases.

    • Unexpected response to DATA.
      This error indicates that the SMTP host provided an invalid or unacceptable response to the DATA command. Check the comments.log file to see what Comments was expecting and what was received instead.

    • Unexpected response to DATA after sending letter.
      This error indicates that the SMTP host provided an invalid or unacceptable response after the body of the email was sent. Check the comments.log file to see what Comments was expecting and what was received instead.

My Account  |   Contact Us  |   Privacy Policy  |   Printer-Friendly Version
 
Copyright © 1995-2025 Greyware Automation Products, Inc.  All Rights Reserved
All Trademarks mentioned are the properties of their respective owners.