--- title: "Get-Contact" slug: "scripting-get-emailmessage" updated: 2025-07-16T20:22:07Z published: 2025-07-16T20:22:07Z canonical: "help.agilityblue.com/scripting-get-emailmessage" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.agilityblue.com/llms.txt > Use this file to discover all available pages before exploring further. # Get-EmailMessage ## Summary Retrieves an existing email message. ```powershell Get-EmailMessage -Id ``` Returns an [email message](https://apidocs.agilityblue.com/#47ed2fff-291a-4746-bc0c-6f88212e6c99) object. ## Parameters | Parameter | Type | Required? | Notes | | --- | --- | --- | --- | | Id | Int32 | Yes | The email message id. | ## Examples ### Get an existing email message This example retrieves a specific email message and outputs it as JSON. ```powershell # Get an existing email message $emailMessage = Get-EmailMessage -Id 1 # Convert the email message from a PowerShell object to a JSON object so we can observe the available properties Write-Output $emailMessage | ConvertTo-Json -Depth 10 ``` ```json { "EmailMessageId": 1, "ExternalMessageId": "4mhoD3UITUCNiXKpCMYBIQ", "Direction": "Outbound", "Status": "Sent", "To": "jdough@agilityblue.com", "Cc": null, "Bcc": null, "FromAddress": "no-one@nowhere.com", "FromName": "Max Miller", "Subject": "Email Test", "Date": "2020-10-14T13:07:38.9595745+00:00", "Body": "
Did you try turning it off and then back on, first?
Thanks,
Support