search cancel

Email action pack failure with smtps: Can not connect to mail server

book

Article ID: 201694

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

When using the option SMTPS with the  PCK.AUTOMIC_EMAIL to send an email via smtps, the job fails with the error below:

Couldn't connect to host, port: localhost, 465; timeout -1 . Can not connect to mail server at 'stmp.gmail.com:587'.
Connection ERROR: (smtps) to stmp.gmail.com:587/[email protected]
Connection problems to mail server. Aborting ...

Cause

The option smtps does not work on PCK.AUTOMIC_EMAIL as expected, the smtp server parameters are not used, instead localhost and port 465 are used.

Environment

Release : 12.3

Component : PACKAGE EMAIL

Versions affected: 1.18 and inferior

Resolution

Workaround:

Using plain smtp over TLS instead of smtps works fine and it's more secure.

Example of a working configuration:

java -jar "email-tool.jar" mail Send -s "smtp.gmail.com:587" -u "[email protected]" -pwd "yourpassword" -mf "[email protected]" -to "[email protected]" -sbj "Test Email from Automic Action Pack" -b "Test Email from Automic Action Pack" -at "" -prc "smtp" -au "YES" -ll "DEBUG"


Solution:

Update to a fix version listed below or a newer version if available.

Fix version:

Component(s): Package.Email 

Package.Email 1.1.9 - Available 

Additional Information

A bit more information on SMTP, SMTP offers the following default ports.

25 - Used for plain text communication over SMTP protocol

587 - Used for secure communication over SMTP protocol. In this process, the connection will be automatically upgraded to a secured one using TLS (preferred way of communication) before sending username/password to SMTP server.

465 - Used for secure communication over SMTPS protocol. Supports SSL. However, it is legacy and not used anymore.

TLS is more advanced encryption than SSL.