How to send attachment in the Automation Policy e-mail?
search cancel

How to send attachment in the Automation Policy e-mail?


Article ID: 219364


Updated On:


IT Management Suite


The customer has a large report that he needs to attach to an Automation Policy email. How can he accomplish this?


ITMS 7.6, 8.x


Starting with IT Management Suite 7.6 release, you can add an attachment to the Automation Policy e-mail. Note that no UI changes are introduced and it is just a way to define attachment in the existing UI.

You can use this option for Send automated report e-mail task, Send automation policy e-mail task, etc.

To add an attachment to an e-mail, you must add some "markup" tokens to define the attachments and the body in the email body definition as follows:

<!-- SMP:[type];[name;mime] -->
[type] can be one of the following:
  • A/ATT/ATTACH - to define attachment text. Everything until the next "markup" (or message end, if none) is treated as the attachment content.
  • F/FILE - to define a file name to be included (must be full pathname on Notification Server computer)
  • B/BODY/(none) - to define the body of the e-mail

[name] - the name of the attachment or file
[mime] - one of the encoding types "text/plain", "text/html" etc. If not specified, default is used or resolved by file type automatically.


EXAMPLE 1: to attach a report

<!-- SMP:A;report.htm -->

<!-- SMP:B -->
<html><body>Please check attachment</html></body>

NB! The marker start should only have one (1) space between "<!--" and "SMP:" to match.


EXAMPLE 2: to attach a particular file by path, used 'F'

<!-- SMP:F;C:\report1.htm -->

or 'A' with '@' before file name

<!-- SMP:A;@C:\report1.htm -->


EXAMPLE 3: to attach a ZIP document

<!-- SMP:ZA; -->

This content of the section will be zipped.

<!-- SMP:ZF;;;c:\ProgramData\Symantec\SMP\Logs*.log -->

All .log files from the default folder will be zipped and added to the attachment as a single file.

Additional Information

Article about adding tokens to the subject line of an Automation Policy:

162988 "Send CSV results as attachment in the Automation Policy e-mail"

220245 "Unable to receive the email from an Automation Policy that uses a report that returns a large number of rows"