🧡 Skip to main content🔍 Skip to search
Thomas UnderwoodBy Thomas Underwood 🕙 Updated on January 3, 2024 at 10:00 am
YouTube video · Monitor an FTP server & send file via email

Automation Workshop strongly relies on its email sending capacities. It features Send Email Action that can send automated email messages according to user specified scenarios. It also uses email to report successful Task completions and failures.

Automation Workshop monitors files and folders on local & network or remote servers like Amazon S3 and SFTP, and executes Actions when files or folders are created, modified or deleted according to defined conditions · Getting started · Automation videos

Let's debug… the SMTP

This article will show how to troubleshoot SMTP connectivity by using ping and telnet commands as well as Send Email Action built-in in Automation Workshop.

Overview

Since Automation Workshop uses specified SMTP server for sending email, it is essential to ensure SMTP connectivity. If SMTP server is not reachable, Automation Workshop will not be able to deliver email messages, which in turn can lead to various problem situations.

Email options
Automation Workshop email options

Verify SMTP settings

First of all, ensure that the email settings are configured correctly. Open Options from Tools menu in Automation Workshop Manager and go to the Email tab. SMTP server name or IP address as well as connection type and port number must be specified correctly. If unsure, contact system administrator or consult SMTP server help to get the necessary parameters.

If SMTP server is provided by Internet Service Provider (ISP), try contacting its support service to inquire for necessary SMTP server parameters.

Ping SMTP server…

Step 1: Ping SMTP server to verify server connectivity. As the first SMTP connectivity test, let us try using ping command. We need to open Windows command prompt:

  • How to open Windows command prompt in Windows? Open the Start Menu and type cmd in Search input. Click on cmd.exe in the list.
  • How to open Windows command prompt in older Windows versions? Click on the Run option in Start Menu. Type cmd in the Run window and click OK.
ping mail.example.com

When in Command prompt, type ping mail.example.com where mail.example.com is the name or IP address of SMTP server you intend to use. Normally, if SMTP server is reachable, it should reply.

If SMTP server is not reachable, the ping request will timeout. However, some SMTP servers are configured to explicitly block ping requests. Thus, even if the ping packet timeouts, you should still try to telnet the SMTP server unless absolutely sure that ping command should not be blocked.

ping mail.example.com

Pinging mail.example.com [192.168.0.33] with 32 bytes of data:
Reply from 192.168.0.33: bytes=32 time=56ms TTL=54
Reply from 192.168.0.33: bytes=32 time=56ms TTL=54
Reply from 192.168.0.33: bytes=32 time=56ms TTL=54
Reply from 192.168.0.33: bytes=32 time=57ms TTL=54

Ping statistics for 192.168.0.33:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
   Minimum = 56ms, Maximum = 57ms, Average = 56ms

Most probably though, if ping command timeouts, the server address is not reachable. If SMTP server does not work, although its IP address is reachable by ping command, the SMTP server software might not be running on the specified machine · Ping server regularly

ping mail.example.com

Pinging mail.example.com [192.168.0.33] with 32 bytes of data:
Reply from 192.168.0.33: Destination host unreachable.
Reply from 192.168.0.33: Destination host unreachable.
Request timed out.
Request timed out.

Ping statistics for 192.168.0.33:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss)

Open telnet

Step 2: Telnet SMTP server. Telnet is TCP/IP based protocol that can be used to connect remote computer system through terminal emulation program. We will use it to verify SMTP server connectivity. Start the telnet program:

  • How to start telnet program in Windows? Open the Start Menu and type telnet in Search input. Click on telnet.exe if it is present in the list. If telnet.exe is not in the list, probably it is not be installed.
  • How to start telnet program in older Windows versions? Click on the Run option in Start Menu. Type telnet in the Run window and click OK.

No telnet?

To install telnet, click Start button, select Control Panel, Programs, and click on Turn Windows Features on or off. In the available program list, scroll down and select Telnet Client. Click OK to start the installation. Alternatively, run the following command string from command prompt or Run window:

start /w pkgmgr /iu:"TelnetClient"

Telnet SMTP server…

When telnet terminal is open, we can now continue with SMTP connectivity testing. To connect to the SMTP server, type: o smtp.example.com 25 in telnet command prompt (where smtp.example.com should be replaced by actual SMTP server and 25 by the actual SMTP server port).

Welcome to Microsoft Telnet Client

Escape Character is 'CTRL+]'

Microsoft Telnet>
o smtp.example.com 25

Alternatively, you can enter telnet command followed by SMTP server name or IP address directly into Run window or Search program and files input (both accessible from Start Menu).

telnet smtp.example.com 25

If connection is successful, SMTP server should return code 220 with server address, connection type, greeting, mail server software version and other information. Sometimes, though, the server is configured to return only reply code (without other text).

Let us try sending SMTP server some command… enter the helo testing command.

220 smtp.example.org ESMTP Server is glad to see you!
helo testing

Normally, SMTP server should return code 250 followed by additional information. If codes 220 and 250 were returned when, respectively, connecting SMTP server and sending helo command, SMTP server is most likely working properly.

220 smtp.example.org ESMTP Server is glad to see you!
helo testing
250 smtp.example.org

If using telnet to establish SMTP connection has failed, try checking local firewall and antivirus software settings to see if telnet has necessary rights to connect to the SMTP server. Also ensure that SMTP is accepting connections from the IP address of this particular machine.

If telnet connection is working properly, yet Automation Workshop cannot connect to SMTP server, try checking antivirus and firewall settings either on local machine or remote hardware to see if Automation Workshop has necessary rights to connect to the SMTP server.

Save your time by automating!

Real users are utilizing Automation Workshop to automate tasks in Windows PCs and Windows Servers. It is the best Windows automation software and has been in the market since 2008. It is evolving rapidly to keep up with the constantly changing IT landscape.

Jayne B., quote about Automation Workshop
I love the Automation Workshop. It's so easy to use. It's one of the few products that really delivers what it promises.—Jayne B.

Test SMTP with Send Email…

Step 3: Testing SMTP connectivity with Send Email Action. Even if ping and telnet commands return fully successful results when testing SMTP server connectivity, some other problems might persist. We will use Send Email Action of Automation Workshop to retrieve the most detailed data on the connection between Automation Workshop and SMTP server.

First, let us create a Task that will test SMTP connection whenever it is executed. Open Automation Workshop and click New Task… in File menu. This will open the Task Wizard. After reading the Welcome screen, click Next. Click Next once more to skip the Trigger screen (unless you would like to set up periodic SMTP testing by adding Task Scheduler trigger).

In Actions tab, push the Add button (this will open Add Action window) and select Send Email from Email category, and click OK—this will open Send Email Action settings.

Now, let us configure Send Email Action for SMTP testing. Fill in From, To, Subject and Email text fields. Then, open Server tab and choose either default SMTP server (set in of Automation Workshop options) or custom SMTP server. In the latter case we will have to set SMTP server address, port, connection security protocol and authentication type and credentials.

Advanced debug

After configuring SMTP server settings, go to Advanced tab. We have to enable client and SMTP server communication logging in order to save data session into text file. Enable the checkbox and choose the file in which you would like to save SMTP server communication with Automation Workshop.

Enable client and SMTP server communication logging—email file.txt
Enable full client and server communication details

Since every new log overwrites the previous one, we can add date and time variable to file name specification in order to preserve all log files, each with recognizable name.

Click Variable Wizard button and choose Sortable file (dashed) from Presets in Date & Time category. This option returns current date and time in easy to read format that can be used in file names (i.e., without characters not allowed in file names like slashes or colons).

Enable client and SMTP server communication logging—log file ‐ [date].txt
Enable full client and server communication details + date

In either case choose Log full client and server communication details as Log level setting to save as much data as possible for troubleshooting purposes.

Finally, check Headers and Options tabs for additional options you would like to set and click OK to save the Send Email settings and return to Task Wizard. Click Next to configure email reports in Reports tab. Then in Task tab give Task a name and, optionally, description and finish creation of Task.

The Task is now saved in the Task folder where we created it. If the Task Scheduler trigger was not added when the Task was created, it can only be executed manually. Select the Task and choose Run Task option from File menu. Alternatively, Run Task can be accessed from context menu, Task toolbar and keyboard shortcut CTRL+F5.

Summary

Every time you run the Task, it will perform the Send Email Action which will send an email from specified email address to specified recipient and, additionally, save communication session with SMTP server into the text file with unique name containing the date and time the Send Email Action was performed.

Now you can either analyze the logs to see if some errors occur or send these text files to support to illustrate the issue at hand. See an example of successful email session:

Server: 220 smtp.example.org ESMTP Server is glad to see you!
Client: HELO user
Server: 250 smtp.example.org
Client: MAIL FROM:<sender@example.com>
Server: 250 2.1.0 Ok
Client: RCPT TO:<recipient@example.com>
Server: 250 2.1.5 Ok
Client: DATA
Server: 354 End data with <CR><LF>.<CR><LF>
Client: From: sender@example.com
To: recipient@example.com
Subject: Testing SMTP connectivity!
X-Mailer: Febooti Automation Workshop
Content-Type: text/plain;
              charset=UTF-8
Date: Tue, 17 Mar 2020 17:13:54 +0200
X-Priority: 3 (normal)

SMTP connectivity test
(with logging session details to text file).

---
Email sent with trial version
of Automation Workshop 8.5.0
Visit febooti.com to get full version


Client:
.
Server: 250 2.00 Ok: queued as 7C00F9D715
Client: QUIT
Server: 221 2.00 Bye

SMTP reply codes

The list of most common SMTP reply codes:

SMTP reply code Description
214Help message.
220Service ready.
221Service closing transmission channel.
250Requested mail action okay; completed.
354Start mail input; End data with <CR><LF>.<CR><LF>
421Service not available; closing transmission channel.
450Requested mail action not taken; mailbox unavailable.
500Syntax error; command unrecognized.
501Syntax error in parameters or arguments.
502Command not implemented.
503Bad sequence of commands.
504Command parameter not implemented.
521Domain does not accept mail.
530Access denied.
535SMTP authentication unsuccessful.
550Unable to relay.
552Requested mail action aborted; exceeded storage allocation.
553Requested action not taken; mailbox name not allowed.
554Relay access denied.

Relaying denied?

Most common error is relaying denied (with code 550 or 554) which usually means that user authentication (username and password) is necessary in order to send an email through the particular SMTP server. Some examples of relaying denied error texts (depends on SMTP server software and version):

  • Server Response: 550 Relaying is prohibited.
  • Server Response: 550 5.7.1 Unable to relay.
  • Server Response: 550 Relaying denied.
  • Server Response: 554 Relay access denied.

If all tests are successful, the email should be delivered to recipient's address. If the test email is not delivered, there might be some problems with recipient's mailbox (e.g., mailbox does not exist, is full or some other problem). Check the mailbox specified in the From address to see if it contains email delivery problem notification from mail system. If accessible, you can also consult SMTP server log files.

More relaying debugging…

Unleash productivity…

Automation videos · explore our extensive collection of video tutorials dedicated to guiding you through the creation of your own automation workflows. See a quick sneak-peek of our video library, offering you a glimpse into the extensive range of automation topics covered…

YouTube video · Monitor an FTP server & send file via email
Monitor an FTP server & send file via email
YouTube video · Synchronize SFTP server files & documents
Synchronize SFTP server files & documents
YouTube video · Automate file transfer on OneDrive
Automate file transfer on OneDrive
YouTube video · Delete old log files
Delete old log files
YouTube video · Automatic CPU pinning in Windows
Automatic CPU pinning in Windows
YouTube video · Detect 1 and email 3 files
Detect 1 and email 3 files
Great success!

Congratulations!

We have tested SMTP server connectivity by using ping and telnet commands as well as the Send Email Action that is built-in in Automation Workshop.

While the former two allowed us to verify whether the machine at the specified address is online and whether it is correctly running SMTP server software on the specified port, respectively, the use of Send Email Action has provided us with full communication data between Automation Workshop and SMTP server.

The communication session log is saved into uniquely named text file each time the SMTP testing Task is executed.

Popular SMTP settings

Discover

Automation Workshop includes many more awesome Triggers and numerous Actions to aid you to automate any repetitive computer or business task by providing state-of-the-art GUI tools.

Automated Trigger · File & Folder Watcher
File & Folder Watcher
Automate Action · Compare
Compare

Debug more?

Command Line Email is powerful but easy-to-use email sending utility, which supports all basic and advanced email client sending capabilities · Quick start

Seamless automation in action! 90 seconds to efficiency.

Assistance is here…

If you have any questions, please do not hesitate to contact our support team.