← Back to plugin index

Report Mailer Task

Description
This task plug-in iterates over the files in a directory (e.g. rendered reports) and emails each file as attachment to a configured list of recipients.

The task can for example be used to send generated PDFs to administrators.

Type name
ReportMailerTask
Class
com.airlock.iam.servicecontainer.app.application.configuration.task.ReportMailerTask
May be used by
Properties
Directory (directory)
Description
Denotes the directory containing the files to be emailed.

This may be either an absolute path or relative to the current directory of the running VM.

The directory must be writable (if processed files must be deleted).

Attributes
File/Path
Mandatory
Filename Suffix (filenameSuffix)
Description
A file in the configured directory is only mailed if its name matches this suffix.
The suffix is NOT case-sensitive. If the property is not configured all files are considered.
Attributes
String
Optional
Example
.pdf
Example
.txt
Filename Prefix (filenamePrefix)
Description
A file in the configured directory is only mailed if its name matches this prefix.
The prefix matched against the filename only, i.e. without the path to the folder it is in.
The prefix is NOT case-sensitive. If the property is not configured all files are considered.
Attributes
String
Optional
Example
pwd-letter-
Example
matrix-
Delete Processed Files (deleteProcessedFiles)
Description
If set to true (the default), the processed files are deleted after successful mailing.

Note: Not deleting the file usually means that it gets mailed again and again.

Attributes
Boolean
Optional
Default value
true
Mail Text (mailText)
Description
The email text that is sent with the file. If the text is HTML code, then the property "mail-text-is-html" must be set to true.
Attributes
String
Mandatory
Multi-line-text
Example
Dear Administrator

The attached file has been generated by Airlock IAM and should be taken care of.

Best Regards
Your Airlock IAM Server

Email Text Is HTML (mailTextIsHtml)
Description
Set to true if the email text is HTML code.
Attributes
Boolean
Optional
Default value
true
Mail Subject (mailSubject)
Description
The subject text that is sent with the file.
Attributes
String
Mandatory
Example
Airlock Gridcard to Print
Email Service (emailService)
Description
The Email-Service plugin to be used to send the Emails. It defines the sender address of the email, the SMTP server and alike.
Attributes
Plugin-Link
Mandatory
Assignable plugins
Recipients (recipients)
Description
The list of recipient email addresses.
Attributes
String-List
Mandatory
YAML Template (with default values)

type: ReportMailerTask
id: ReportMailerTask-xxxxxx
displayName: 
comment: 
properties:
  deleteProcessedFiles: true
  directory:
  emailService:
  filenamePrefix:
  filenameSuffix:
  mailSubject:
  mailText:
  mailTextIsHtml: true
  recipients: