How to email reports (Legacy KB ID CNC dev398 )

Document ID : KB000052132
Last Modified Date : 14/02/2018
Show Technical Document Details
GUI generated reports, both scheduled and ad hoc, can be setup to email the output to one or more recipients.

In the report setup window:
1. Check the Other box under Output
2. Click the Select... button.
3. When the Select Other Outputs window opens, choose the report format and check the Run Command box. The default command is nhMail.
4. Specify the recipients of the email as an argument to nhMail.

example: nhMail adressee1@domain.com

When sending multiple emails, the format of the argument to nhMail is different depending on the platform that Network Health is running on.

For multiple addresses on UNIX machines, the format is: nhMail 'addressee1@domain.com addressee2@domain.com'
For multiple addresses on NT machines, the format is: nhMail 'addressee1@domain.com+addressee2@domain.com'

For command line use of nhMail:

nhMail command syntax: nhMail [-h] recipients filename

-h Displays help for this command

recipients - Specifies one or more e-mail addresses to whom the command sends the file. If you specify a list, separate the e-mail addresses with a space and enclose the string in single quotation marks.

filename - Specifies the pathname of the file to send to recipients. If you do not specify a full pathname, the command looks for the file in the current directory. Specify a string of pathnames by separating them with a space and enclose the string in single quotation marks.

nhMail recipients filename

Example, to send the file /home/readme.txt to the user jsmith@abc.com, enter the following:

nhMail jsmith@abc.com /home/readme.txt

Please Note - The file will be included within the body of the e-mail message. If the file is a PDF file, it is attached to the e-mail as a MIME attachment.

Sending multiple files to multiple users:

UNIX - Separate the user names and the file names with a space and enclose each set in single quotation marks, as follows:

nhMail 'jdoe@acb.com jsmith@zzz.com' "readme memo"

Windows - User names with a plus (+) sign and enclose them in single quotation marks, but separate the file names with a space and enclose them in double quotation marks, as follows:

nhMail 'jdoe@acb.com+jsmith@zzz.com' "readme memo".

Related Issues/Questions:
How to email reports
Using nhMail to send reports to users
How to automatically receive reports via email
The nhMail command sends one or more files to one or more e-mail recipients
How to automatically email generated reports
Not receiving reports via email
Error: "mail: ERROR signal 13"
How to email reports to multiple users

Problem Environment:
eHealth

Additional Information:
Unix - nhMail uses the native mail facilities to email reports. No additional configuration is required for nhMail if Unix mail is properly configured. The eHealth user must have access to the native mail utility. For further information, please see the solution entitled: How to verify mail utilities are functioning correctly with nhMail

Windows - nhMail requires an environment variable to be set in order for nhMail to work. Set the variable 'NH_NT_SMTP_SERVER' to the name of the SMTP server to be used by the eHealth system in accordance with the directions for setting environment variables on Windows: How to Set or Change eHealth Environment Variables-NT


(Legacy KB ID CNC dev398 )