Set-EmailMessage
  • 1 Minute to read
  • Dark
    Light
  • PDF

Set-EmailMessage

  • Dark
    Light
  • PDF

Article summary

Summary

Updates an existing email message.

Set-EmailMessage
    -Entry

Returns a email message object.

Parameters

Parameter

Type

Required?

Notes

Entry

Email Message Object

Yes


Examples

Updates an existing email message

# Retrieve an existing email message using the Get-EmailMessage cmdlet
$emailMessage = Get-EmailMessage -Id 59

# Change some properties
# In this example, we want to update the body and add a signature block at the bottom
$emailMessage.Body = "$($emailMessage.Body)<p>Best Regards,<br />Litigation Support Department</p>"

# Update the email message using the Set-EmailMessage cmdlet
$updatedEmailMessage = Set-EmailMessage -Entry $emailMessage

# Output a message to the execution log
Write-Output "Updated email message $($updatedEmailMessage.EmailMessageId) ($($updatedEmailMessage.Subject))"

Execution results:

Updated email message 59 (Email was created from a script)