https://github.com/tools4everbv/helloid-task-sa-target-smtp-sendemail
HelloID - Send email message using SMTP
https://github.com/tools4everbv/helloid-task-sa-target-smtp-sendemail
delegated-form email powershell product service-automation smtp task
Last synced: 7 months ago
JSON representation
HelloID - Send email message using SMTP
- Host: GitHub
- URL: https://github.com/tools4everbv/helloid-task-sa-target-smtp-sendemail
- Owner: Tools4everBV
- Created: 2023-11-02T10:46:47.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-15T14:19:05.000Z (over 2 years ago)
- Last Synced: 2025-02-25T22:12:10.525Z (over 1 year ago)
- Topics: delegated-form, email, powershell, product, service-automation, smtp, task
- Language: PowerShell
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HelloID-Task-SA-Target-SMTP-SendEmail
## Prerequisites
>:information_source: The builtin variables `$product`, `$requester`, `$request` and `$manager` are used in this snippet.
For an overview of available variables, please refer to: https://docs.helloid.com/en/service-automation/service-automation-variables.html
## Description
This code snippet can be used to send an email using the `Send-MailMessage` cmdlet.
This snippet executes the following tasks:
1. Define the _emailBody_ object containing the email wrapped in basic HTML.
2. Define a hash table `$splatEmailParams`. The keys of the hash table represent the properties of the `Write-Information -Tag 'Email'` cmdlet, while the values represent the values entered in the hash table. For an overview of available properties, please refer to: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/send-mailmessage?view=powershell-7.3
>:information_source: Make sure to properly adjust the _SmtpServer_ property according to your environment.
3. Send the email message. Currently, the email address of the builtin variable `$manager` is used as recipient.