Automatically send custom e-mail messages from scripts
In addition to the ScriptRunner E-mail Notification Connector you can send e-mails from scripts, with the function SRSendMail from the library script Send-SRMail. The script is part of the ScriptRunner ExtensionPack (via GitHub).
- Define the Script in the Action Wizard.
Select the action and click the EDIT button in the Action Bar (below). Then select the Wizard page PowerShell Options. After activating Library script to preload..., the library script can be selected. The library script will be listed in the drop-down list, if it is stored in a script repository folder named _LIB_ or marked with the _LIB_ tag.
- These parameters are required and must be set when calling the function
Specifies the address from which the e-mail is sent
Specifies the e-mail addresses to which the e-mail is sent.
Use the comma to separate the addresses
Specifies the subject of the e-mail message
- Optionally these parameters can be set:
Specifies the body text of the e-mail message
Specifies the name of the SMTP server that sends the e-mail message.
The default value is the value of the $PSEmailServer preference variable
Specifies a user account that has permission to perform this action.
By default, it is the executing user of the script
Specifies the path and file names of files to be attached to the e-mail message.
Use the comma to separate the files
Specifies the e-mail addresses to which a carbon copy (CC) of the e-mail message is sent. Use the comma to separate the addresses
Specifies the priority of the e-mail message, default is normal
Specifies the type of encoding for the body text, default is UTF-8
Uses the Secure Sockets Layer (SSL) protocol to establish a connection to the remote computer to send e-mail
Specifies that the value of the body text contains HTML, default is true
The script can be found here: ScriptRunner Send Mail Script
This page has been automatically translated and may contain grammatical errors or inaccuracies