The Chilkat SMTPQ service is included with the purchase of a Chilkat Email license. It is a very simple Windows service that watches a queue directory for .eml files and sends email.
The Chilkat mailman’s SendQ, SendQ2, and SendMimeQ methods may be called in place of SendEmail and SendMime. Normally, when SendEmail, SendMime, or other email-sending methods are called, the mailman connects to an SMTP server and steps through the SMTP protocol to send the email. When SendQ, SendQ2, or SendMimeQ are called, the mailman does not connect to an SMTP server. Instead, it encrypts and embeds into the email’s header the SMTP hostname, login and password, as well as any other send-time parameters that may be needed for sending. It then writes the email as a .eml to the SMTPQ’s queue directory.
The SMTPQ service attempts to send email for each .eml found in its queue directory. It does so by loading each .eml file in turn, decrypting the special header fields added by SendQ/SendQ2/SendMimeQ, removing the special header fields, and then connecting to the specified SMTP server using the provided login, password, and other information to send the email. If successful, it will copy the sent .eml to the "Sent" directory. On failure, it will copy the .eml as well as an XML log to the "Undeliverable" directory.
Download Chilkat SMTPQ and install by running the .msi.
The software installs to "c:\Program Files\Chilkat Software Inc\Chilkat SmtpQ\".
Installation is not complete after running the .msi. You still need to install the SMTPQ as a Windows service and start it.
Installing SMTPQ as a Windows Service
You will find two executables in the SMTPQ install directory:
1) ChilkatSmtpQ.exe — This is the SMTPQ service program.
2) SmtpQConfig.exe — This is the SMTPQ configuration program, it is used to install the SMTPQ Windows service, configure it, and start it. Note: The SmtpQConfig.exe is a simple Visual Basic 6.0 program. Chilkat also provides the source for this program in SmtpQConfig.vbp and SmtpQConfig.vbw. It uses the SmtpQMgr.dll, which is an ActiveX with method for installing, uninstalling, starting, stopping, and configuring the SMTPQ service.
Run the SmtpQConfig.exe program by double clicking on it. Here is a screenshot:
Click the "Install Service" button to install SMTPQ as a Windows service.
Once installed, you may choose one of three startup options: "Auto-Start", "Demand-Start", or "Disable". The "Auto-Start" option is chosen by default. To switch to another, simply click on the desired start option’s button.
The SMTPQ service may be uninstalled by clicking "Uninstall Service".
Once installed, you may click on "Start Service" to start the service running. The "Stop Service" button stops the service.
The SMTPQ process is capable of running multiple threads so that emails may be sent simulaneously. My recommendation is to use only a few threads (5 or less) if a single SMTP server is generally used. If many different SMTP servers are used, the "Max Threads" may be set to a higher value. The reason you don’t want too many threads hitting a single SMTP server is because many SMTP servers place limitations on how many connections are accepted from a single IP address.
The "Log Directory" is not used. It is there for debugging purposes in special cases.
If the "Delete After Send" checkbox is checked, successful emails will not be saved to the "Sent Directory".
Tracking Emails Sent via SMTPQ
The Chilkat mailman object has a helpful property named LastSmtpQFilename. It contains the name of the file created in the SMTPQ’s queue directory for the last call to SendQ, SendQ2, or SendMimeQ. If the email is sent successfully by the SMTPQ service, and "Delete After Send" is not checked, then the file will be moved to the "Sent Directory". If the send failed, the .eml will be moved to the "Undelivered Directory" and an XML log file with the same filename (but with a .xml extension) will accompany the failed .eml.