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

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

book

Article ID: 219364

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

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

Environment

ITMS 7.6, 8.x

Resolution

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 -->
<html><body>%!Results!%</body></html>

<!-- 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;report.html.zip -->

This content of the section will be zipped.

<!-- SMP:ZF;symantec-logs.zip;;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:

https://community.broadcom.com/symantecenterprise/communities/community-home/librarydocuments/viewdocument?DocumentKey=7a9d2783-d491-4188-b4f6-618456359cf0&CommunityKey=206bac34-051d-4ea1-b726-4ea8778c1986&tab=librarydocuments

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"