How do I troubleshoot the 'Action_SMTPMail' Knowledge Script? (NETIQKB2937)

  • 7702937
  • 02-Feb-2007
  • 03-Dec-2010

Environment

NetIQ AppManager 6.x
NetIQ AppManager 7.0.x

Situation

How do I troubleshoot the 'Action_SMTPMail' Knowledge Script?
What are the command-line options for NetIQSMTPMail.exe?
Action_SMTPMail generates the following event: 'Event ID [nnn] MS Action: Error - failed to send SMTP email message to the specified recipient(s). The following error was returned from SMTP - FAILED_TO_CONNECT'

Resolution

Use NetIQSMTPMail (in %\NetIQ\AppManager\bin) from the command line.  Run this from machine that Action_SMTPMail takes place on, as configured in job properties (Location on the Actions tab).

Usage:

NetiQSMTPMail -tRecipients [-sSubject] [-fFrom] [-mMessage] [-hHost] [-d]

Example:

C:\WINNT\system32>netiqsmtpmail -tYou@netiq.com -sTest -fSomeone@netiq.com -mItWorks! -h10.10.101.01 -d



Additional Information

Formerly known as NETIQKB2937

If the resulting output Failed_To_Connect is returned, check connectivity and hostname resolution between the host and the SMTP server, and verify that the SMTP service is active by using the command c:\> telnet <smtpserverhostname> 25.

The [-d] option will produce verbose session detail for the SMTP session.  Following is an example of a successful SMTP Session:

C:\Documents and Settings\userxxx\Desktop>netiqsmtpmail -tuserxxx@netiq.com -stest -hDAYTONA -d
HELO darlington
MAIL FROM:<AppManager@NetIQ_Corp>
RCPT TO:<userxxx@netiq.com>
DATA
Return-Path: AppManager@NetIQ_Corp
X-Sender: AppManager@NetIQ_Corp
X-Mailer: NetiQSMTPMail 1.0
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Date: Mon, 06 Jan 2003 14:38:11 -0800
From: AppManager@NetIQ_Corp
Subject: test
To: userxxx@netiq.com

QUIT
Message sent successfully