Troubleshooting SMTP issues
search cancel

Troubleshooting SMTP issues

book

Article ID: 260219

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

How can you troubleshoot SMTP issues when emails are sent with the SEND_MAIL script function or via a CALL object?

Environment

Release : 12.x, 21.x

Resolution

Emails can be sent by the WPs (UC_CLIENT_SETTINGS > SEND_MAIL_DEFAULT not set) or by an Agent (UC_CLIENT_SETTINGS > SEND_MAIL_DEFAULT set) 

(1) When the mail is sent by the WP you need to set the trace level tcp/ip=7 or higher. Subsequently, search the WP traces for the keyword SMTP. 

Below snippet shows the messages for a successfully sent mail:

30 - 20230214/115316.212 - Before call ucsmtp_sendMail4
30 - 20230214/115316.212 - >>> connectSocket()
30 - 20230214/115316.212 -     destination address: 'mail.gateway.com:25'
30 - 20230214/115316.212 - ... IPv6 socket opened
30 - 20230214/115316.212 - >>> getAddrInfo()
30 - 20230214/115316.212 -     calling getaddrinfo('mail.gateway.com')
30 - 20230214/115316.214 - ... processing getaddrinfo() results:
30 - 20230214/115316.214 -     IPv4 address found/selected: '123.34.67.89'
30 - 20230214/115316.214 - ... processing getaddrinfo() results done
30 - 20230214/115316.214 -     IPv4 address selected finally: '123.34.67.89'
30 - 20230214/115316.214 -     IPv4-mapped IPv6 address cnv.: '::ffff:123.34.67.89'
30 - 20230214/115316.214 - <<< getAddrInfo()
30 - 20230214/115316.214 -     connecting to IP address/port: '::ffff:123.34.67.89:25'
30 - 20230214/115316.216 - <<< connectSocket() ... ok
30 - 20230214/115316.219 - SMTP recv: 220 mail.gateway123.com ESMTP
30 - 20230214/115316.219 - SMTP send: EHLO <ae_server>.domain.com
30 - 20230214/115316.221 - SMTP recv: 250-mail.gateway123.com
30 - 20230214/115316.221 - SMTP recv: 250-8BITMIME
30 - 20230214/115316.221 - SMTP recv: 250-SIZE 104857600
30 - 20230214/115316.221 - SMTP recv: 250 STARTTLS
30 - 20230214/115316.221 - SMTP send: MAIL FROM:<[email protected]>
30 - 20230214/115316.222 - SMTP recv: 250 sender <[email protected]> ok
30 - 20230214/115316.222 - SMTP send: RCPT TO:<[email protected]>
30 - 20230214/115316.224 - SMTP recv: 250 recipient <[email protected]> ok
30 - 20230214/115316.224 - SMTP send: DATA
30 - 20230214/115316.225 - SMTP recv: 354 go ahead
30 - 20230214/115316.225 - SMTP send: Date: Tue, 14 Feb 2023 11:53:16 +0100
30 - 20230214/115316.225 - SMTP send: From: <[email protected]>
30 - 20230214/115316.225 - SMTP send: To: <[email protected]>
30 - 20230214/115316.225 - SMTP send: Reply-To: <[email protected]>
30 - 20230214/115316.225 - SMTP send: Subject: test
30 - 20230214/115316.225 - SMTP send: 
30 - 20230214/115316.225 - SMTP send: test
30 - 20230214/115316.225 - SMTP send: .
30 - 20230214/115316.323 - SMTP recv: 250 ok:  Message 178837522 accepted
30 - 20230214/115316.323 - SMTP send: QUIT
30 - 20230214/115316.324 - SMTP recv: 221 mail.gateway123.domain.com
30 - 20230214/115316.324 - After call ucsmtp_sendMail4

(2) When the email is sent by the Agent you need to set tcp/ip=9 and mail=9