SEND_MAIL fails | U00050002 Connection closed by SMTP

book

Article ID: 196352

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine CA Automic One Automation CA Automic Operations Manager CA Automic Oracle

Issue/Introduction

The SEND_MAIL function is failing with the error message

 

U00050006 SMTP server 'smtp.office365.com' has rejected the E-mail command: '530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [casplda02.prod.outlook.com]'

U00050002 Connection closed by SMTP server 'smtp.office365.com'. Connection aborted by SMTP server while waiting for an answer from SMTP server.

U00003434 Server routine 'UCGENX_R/GENX' required '0' minutes and '5,203' seconds for processing.

U00012109 Script 'EXPL.SEND_EMAIL.SCRI' (RunID '0009495108') ended normally.

 

Cause

Unsupported email AUTHENTICATION.

Environment

Release : 11.x,12.x

Component : Automation Engine

Resolution

The command SEND_MAIL only supports PLAIN and LOGIN authentication. The SMTP server  can be verified which Authentication it supports by using th command telnet as shown below.

 

Example from a server that doesn't support AUTH without encryption:
{code}
# telnet mail.automic.com 25
Trying 91.231.22.10...
Connected to mail1.automic.com.
Escape character is '^]'.
220 mail1.automic.com ESMTP Ready
ehlo test.example.com
250-mail1.automic.com Hello test.example.com (84.113.105.89)
250 SIZE
quit
221 mail1.automic.com closing connection
Connection closed by foreign host.
{code}

Example from a server that allows AUTH:
{code}
# telnet smtp.gmx.net 25
Trying 212.227.17.168...
Connected to mail.gmx.net.
Escape character is '^]'.
220 gmx.com (mrgmx103) Nemesis ESMTP Service ready
ehlo test.example.com
250-gmx.com Hello test.example.com [84.113.105.89]
250-SIZE 69920427
250-AUTH LOGIN PLAIN
250 ST