How to email reports (Legacy KB ID CNC dev398 )
Document ID :
Last Modified Date :
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 firstname.lastname@example.org
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 'email@example.com firstname.lastname@example.org'
For multiple addresses on NT machines, the format is: nhMail 'email@example.comfirstname.lastname@example.org'
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 email@example.com, enter the following:
nhMail firstname.lastname@example.org /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 'email@example.com firstname.lastname@example.org' "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 'email@example.comfirstname.lastname@example.org' "readme memo".
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
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 )
Was this information helpful?