Home » Categories » General

GN: General guidelines for sending e-mail via an SMTP server using PQ software products


You need to specify SMTP e-mail server information in order to send e-mail using PQ Systems products like GAGEpack, SQCpack and CHARTrunner.


GAGEpack, CHARTrunner and SQCpack use SMTP (Simple Mail Transfer Protocol) to send e-mail messages. SMTP sends e-mail messages via the TCP/IP network protocol. Sending e-mail messages via MAPI or POP3 is not supported.

The basic steps that occur when the PQ software sends an e-mail message are:

  1. The PQ software connects to the SMTP server it was told to use and says "hello".  The SMTP server replies back with its own "nice to meet you".
  2. The PQ software gives the SMTP server the e-mail message and the destination address and says "please send this for me". The SMTP server replies back and says "OK" or "I can't do that and here is why."
  3. The SMTP server determines the IP address of the SMTP server that handles e-mail for the destination address, connects to the destination SMTP server, and delivers the e-mail message.

In order to send e-mail:

  1. The computer where the PQ software is installed must be running the TCP/IP network protocol.
  2. The computer where the PQ software is installed must be able to connect to an SMTP e-mail server (on port 25) that will accept e-mail from your computer and send e-mail to the addresses you want to send to. Sometimes a given SMTP e-mail server will be setup to only send e-mail from computers that are within your company's network. Other times a given SMTP e-mail server will be setup by the IT folks to never accept SMTP mail from any computers in the company network. There also may be restrictions placed on the SMTP e-mail server about what e-mail addresses it will send e-mail to. You may have to check with your IT department or system administrator to determine an appropriate SMTP e-mail server for your use.
  3. You must provide the PQ software with the IP address (or equivalent) of the SMTP mail server that will be used to send e-mail messages.

How can you determine if your computer is running the TCP/IP network protocol?
You should be able to open a DOS window and successfully run the command "ping localhost" (without quotation marks). See the example below. If your computer cannot find the ping.exe program or your results are not similar to the example, you may need to set up the TCP/IP protocol on your computer. Contact your system administrator if you need assistance.

C:>ping localhost
Pinging DevComputer1 [] with 32 bytes of data:
Reply from bytes=32 time<1ms TTL=128
Reply from bytes=32 time<1ms TTL=128
Reply from bytes=32 time<1ms TTL=128
Reply from bytes=32 time<1ms TTL=128
Ping statistics for
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

How to Determine the SMTP E-mail Server You Can Use
Your computer must be able to connect to an SMTP e-mail server via port 25, the SMTP server must accept e-mail from your computer, and the SMTP server must be capable of delivering e-mail messages to the addresses you want to send to. Many companies have an SMTP e-mail server on their company network. You will probably find it easiest to contact the IT department or system administrator for your company in order find out what SMTP e-mail server you should use.

Here are some steps that may prove helpful if you must determine the SMTP server's address yourself.

  1. Query the MX records (which specify the SMTP server to use when delivering inbound e-mail) for your company's domain and try the SMTP server(s) you discover there. To do this, open a command window, run a program called nslookup, tell nslookup that you are interested in MX record information, and tell it to lookup the domain that you specify. In the example shown below, the MX records for mycompany.com are queried. The commands that you enter are shown in bold:

    C:> nslookup
    Default Server: dns.mydomain.com

    > set type=mx
    > mycompany.com
    Server: dns.mydomain.com

    Non-authoritative answer:
    mycompany.com  MX preference = 10, mail exchanger = smtp1.mycompany.com
    mycompany.com  MX preference = 20, mail exchanger = smtp2.mycompany.com

    smtp1.mycompany.com   internet address = 100.200.300.1
    smtp2.mycompany.com   internet address = 100.200.300.2

    In this example the nslookup program tells you that two SMTP servers handles inbound e-mail for the mycompany.com domain. In other words, if e-mail is sent to sales@mycompany.com then either the SMTP server at smtp1.mycompany.com or smtp2.mycompany.com would be contacted to deliver the message. Some companies have multiple SMTP servers to handle e-mail, and some have a single SMTP server. In this example, you could try specifying smtp1.mycompany.com or smtp2.mycompany.com in the Outgoing SMTP mail server (IP address, domain name or computer name) field shown below.
  2. Send a test e-mail message to someone outside of your company (for instance to PQ Systems technical support) and have the recipient of the message extract the internet headers and return them to you. The internet headers can be viewed in Outlook by right-clicking on the message and selecting Options.  Click with the mouse in the internet headers field, press Ctrl-A to select all of the headers, then Ctrl-C to copy the headers to the clipboard, then paste the headers into an e-mail message using Ctrl-V.

    The internet headers for a test message might look similar to this example:
    Received: from smtp1.mycompany.com ([100.200.300.1]) by mail.testcompany.com with SMTP
    id LMA4HXP1; Thu, 2 Jun 2005 15:13:05 -0400
    Received: from fredf.mycompany.com
    by smtp1.mycompany.com (8.11.6/8.11.6) with ESMTP id j52IQ7L02013
    for support@testcompany.com; Thu, 2 Jun 2005 14:26:07 -0400
    Subject: This is a test message to determine my SMTP server
    To: support@testcompany.com
    From: Fred.Flintstone@mycompany.com
    Date: Thu, 2 Jun 2005 15:12:58 -0400
    The most recent header is the one at the top of the headers, and that's typically the one we are interested in. In the example shown above, we see that the SMTP server at the destination company, i.e. mail.testcompany.com, received the message from smtp1.mycompany.com. Therefore, you could try specifying smtp1.mycompany.com in the Outgoing SMTP mail server (IP address, domain name or computer name) field shown below.

The E-mail Setup Form

The following E-mail setup screen from CHARTrunner is similar to the same type of screen that is in SQCpack.

  • Outgoing SMTP mail server (IP address, domain name or computer name) - Enter the address of your SMTP e-mail server. The PQ software needs to know the IP address (a number like of the SMTP server that will be used to deliver e-mail. Instead of entering the IP address, you can use a domain name, such as smtp.mydomain.com, as long as a DNS server is available to translate the specified domain name into an IP address. Or, you can enter the computer name of the SMTP server if a WINS server is available to translate the computer name to an IP address. Check with your IT department to find out what SMTP server is available and how to specify its IP address. Most SMTP e-mail servers do not require a username and password to connect to the server. PQ software will only work with an SMTP server that does not require a username and password to connect.
  • Send test e-mail - Click this button to attempt to send a test e-mail message using the SMTP e-mail server you specified. The Test e-mail status shows the SMTP commands and responses between the PQ software and the SMTP server, and may prove helpful in diagnosing a communications problem.
  • Connect timeout in seconds - Enter a timeout value in seconds. This is the length of time that the software will wait while attempting to open a connection from your computer to your SMTP e-mail server. If the software cannot connect to the SMTP server within the timeout period, the message will not be sent. 

 The E-mail Test Utility

Two attachments are available at the bottom of this page. Each zip archive contains a PQ Systems utility that allows you to test sending an e-mail from your computer to an SMTP mail server. These test utilities are functionally similar to the "Send test e-mail" functionality built into PQ products - but you may find that the separate utility program gives you more testing options.

SMTPmailer_COM.zip contains a version of SMTPmailer.exe that depends upon an ActiveX component that is installed as part of the GAGEpack, CHARTrunner or SQCpack install. This utility will not work unless you already have the needed ActiveX component from an install of the appropriate PQ Systems product.

SMTPmailer_NET.zip contains a version of SMTPmailer.exe that should work as long as you have the Microsoft .NET framework 2.0 or higher installed.

Attachments (2) Attachments
Related Articles RSS Feed
GN: Link to Chart Images from PowerPoint
Viewed 3384 times since Fri, Jan 22, 2010
GN: Cannot Read License File due to Data Execution Protection (DEP)
Viewed 2588 times since Fri, Nov 9, 2007
GN - Permissions for the PQ Systems registry key
Viewed 2752 times since Fri, Nov 9, 2007
GN: Couldn’t update; currently locked - error on Netware
Viewed 2078 times since Wed, Nov 14, 2007
GN - Using the PQ Application Cleaner Utility
Viewed 2908 times since Fri, Nov 9, 2007
GN: PqLicenseMrg.exe Installation Error
Viewed 2507 times since Wed, Oct 28, 2009
GN: DAO360.DLL or DAO350.DLL Improperly Installed to Root of Drive on Windows XP
Viewed 7301 times since Fri, Nov 9, 2007
GN: Using the PQ Application Information Utility
Viewed 4687 times since Thu, Mar 8, 2012
GN: How to do an Unattended Install or Uninstall of a PQ Systems product
Viewed 2249 times since Fri, Dec 7, 2007
GN: Using Dependency Walker to Diagnose ActiveX Component Registration Problems
Viewed 18370 times since Fri, Nov 9, 2007