Skip to content

maislurp-client-powershell.maislurp-client-powershell/Api.SentEmailsControllerApi

All URIs are relative to https://api.mailslurp.com

Method HTTP request Description
Invoke-DeleteAllSentEmails DELETE /sent Delete all sent email receipts
Invoke-DeleteSentEmail DELETE /sent/{id} Delete sent email receipt
Get-AllSentTrackingPixels GET /sent/tracking-pixels
Get-RawSentEmailContents GET /sent/{emailId}/raw Get raw sent email string. Returns unparsed raw SMTP message with headers and body.
Get-RawSentEmailJson GET /sent/{emailId}/raw/json Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format.
Get-SentEmail GET /sent/{id} Get sent email receipt
Get-SentEmailHTMLContent GET /sent/{id}/html Get sent email HTML content
Get-SentEmailPreviewURLs GET /sent/{id}/urls Get sent email URL for viewing in browser or downloading
Get-SentEmailTrackingPixels GET /sent/{id}/tracking-pixels
Get-SentEmails GET /sent Get all sent emails in paginated form
Get-SentOrganizationEmails GET /sent/organization

void Invoke-DeleteAllSentEmails

Delete all sent email receipts

Example

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: API_KEY
$Configuration.ApiKey.x-api-key = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.x-api-key = "Bearer"


# Delete all sent email receipts
try {
     $Result = Invoke-DeleteAllSentEmails
} catch {
    Write-Host ("Exception occured when calling Invoke-DeleteAllSentEmails: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to ]

void Invoke-DeleteSentEmail
        [-Id]

Delete sent email receipt

Example

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: API_KEY
$Configuration.ApiKey.x-api-key = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.x-api-key = "Bearer"

$Id = "Id_example" # String | 

# Delete sent email receipt
try {
     $Result = Invoke-DeleteSentEmail -Id $Id
} catch {
    Write-Host ("Exception occured when calling Invoke-DeleteSentEmail: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
Id String

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to ]

PageTrackingPixelProjection Get-AllSentTrackingPixels
        [-Page]
        [-Size]
        [-Sort]
        [-SearchFilter]
        [-Since]
        [-Before]

Get all sent email tracking pixels in paginated form

Example

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: API_KEY
$Configuration.ApiKey.x-api-key = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.x-api-key = "Bearer"

$Page = 987 # Int32 | Optional page  in sent email tracking pixel list pagination (optional) (default to 0)
$Size = 987 # Int32 | Optional page size in sent email tracking pixel list pagination (optional) (default to 20)
$Sort = "ASC" # String | Optional createdAt sort direction ASC or DESC (optional) (default to "ASC")
$SearchFilter = "SearchFilter_example" # String | Optional search filter (optional)
$Since = Get-Date # System.DateTime | Filter by created at after the given timestamp (optional)
$Before = Get-Date # System.DateTime | Filter by created at before the given timestamp (optional)

try {
     $Result = Get-AllSentTrackingPixels -Page $Page -Size $Size -Sort $Sort -SearchFilter $SearchFilter -Since $Since -Before $Before
} catch {
    Write-Host ("Exception occured when calling Get-AllSentTrackingPixels: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
Page Int32 Optional page in sent email tracking pixel list pagination [optional] [default to 0]
Size Int32 Optional page size in sent email tracking pixel list pagination [optional] [default to 20]
Sort String Optional createdAt sort direction ASC or DESC [optional] [default to "ASC"]
SearchFilter String Optional search filter [optional]
Since System.DateTime Filter by created at after the given timestamp [optional]
Before System.DateTime Filter by created at before the given timestamp [optional]

Return type

PageTrackingPixelProjection (PSCustomObject)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

String Get-RawSentEmailContents
        [-EmailId]

Get raw sent email string. Returns unparsed raw SMTP message with headers and body.

Returns a raw, unparsed, and unprocessed sent email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawSentEmailJson endpoint

Example

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: API_KEY
$Configuration.ApiKey.x-api-key = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.x-api-key = "Bearer"

$EmailId = "EmailId_example" # String | ID of email

# Get raw sent email string. Returns unparsed raw SMTP message with headers and body.
try {
     $Result = Get-RawSentEmailContents -EmailId $EmailId
} catch {
    Write-Host ("Exception occured when calling Get-RawSentEmailContents: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
EmailId String ID of email

Return type

String

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain

[Back to top] [Back to API list] [Back to Model list] [Back to ]

RawEmailJson Get-RawSentEmailJson
        [-EmailId]

Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format.

Returns a raw, unparsed, and unprocessed sent email wrapped in a JSON response object for easier handling when compared with the getRawSentEmail text/plain response

Example

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: API_KEY
$Configuration.ApiKey.x-api-key = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.x-api-key = "Bearer"

$EmailId = "EmailId_example" # String | ID of email

# Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format.
try {
     $Result = Get-RawSentEmailJson -EmailId $EmailId
} catch {
    Write-Host ("Exception occured when calling Get-RawSentEmailJson: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
EmailId String ID of email

Return type

RawEmailJson (PSCustomObject)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

SentEmailDto Get-SentEmail
        [-Id]

Get sent email receipt

Example

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: API_KEY
$Configuration.ApiKey.x-api-key = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.x-api-key = "Bearer"

$Id = "Id_example" # String | 

# Get sent email receipt
try {
     $Result = Get-SentEmail -Id $Id
} catch {
    Write-Host ("Exception occured when calling Get-SentEmail: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
Id String

Return type

SentEmailDto (PSCustomObject)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

String Get-SentEmailHTMLContent
        [-Id]

Get sent email HTML content

Example

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: API_KEY
$Configuration.ApiKey.x-api-key = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.x-api-key = "Bearer"

$Id = "Id_example" # String | 

# Get sent email HTML content
try {
     $Result = Get-SentEmailHTMLContent -Id $Id
} catch {
    Write-Host ("Exception occured when calling Get-SentEmailHTMLContent: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
Id String

Return type

String

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/html

[Back to top] [Back to API list] [Back to Model list] [Back to ]

EmailPreviewUrls Get-SentEmailPreviewURLs
        [-Id]

Get sent email URL for viewing in browser or downloading

Get a list of URLs for sent email content as text/html or raw SMTP message for viewing the message in a browser.

Example

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: API_KEY
$Configuration.ApiKey.x-api-key = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.x-api-key = "Bearer"

$Id = "Id_example" # String | 

# Get sent email URL for viewing in browser or downloading
try {
     $Result = Get-SentEmailPreviewURLs -Id $Id
} catch {
    Write-Host ("Exception occured when calling Get-SentEmailPreviewURLs: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
Id String

Return type

EmailPreviewUrls (PSCustomObject)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

PageTrackingPixelProjection Get-SentEmailTrackingPixels
        [-Id]
        [-Page]
        [-Size]
        [-Sort]
        [-SearchFilter]
        [-Since]
        [-Before]

Get all tracking pixels for a sent email in paginated form

Example

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: API_KEY
$Configuration.ApiKey.x-api-key = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.x-api-key = "Bearer"

$Id = "Id_example" # String | 
$Page = 987 # Int32 | Optional page  in sent email tracking pixel list pagination (optional) (default to 0)
$Size = 987 # Int32 | Optional page size in sent email tracking pixel list pagination (optional) (default to 20)
$Sort = "ASC" # String | Optional createdAt sort direction ASC or DESC (optional) (default to "ASC")
$SearchFilter = "SearchFilter_example" # String | Optional search filter (optional)
$Since = Get-Date # System.DateTime | Filter by created at after the given timestamp (optional)
$Before = Get-Date # System.DateTime | Filter by created at before the given timestamp (optional)

try {
     $Result = Get-SentEmailTrackingPixels -Id $Id -Page $Page -Size $Size -Sort $Sort -SearchFilter $SearchFilter -Since $Since -Before $Before
} catch {
    Write-Host ("Exception occured when calling Get-SentEmailTrackingPixels: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
Id String
Page Int32 Optional page in sent email tracking pixel list pagination [optional] [default to 0]
Size Int32 Optional page size in sent email tracking pixel list pagination [optional] [default to 20]
Sort String Optional createdAt sort direction ASC or DESC [optional] [default to "ASC"]
SearchFilter String Optional search filter [optional]
Since System.DateTime Filter by created at after the given timestamp [optional]
Before System.DateTime Filter by created at before the given timestamp [optional]

Return type

PageTrackingPixelProjection (PSCustomObject)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

PageSentEmailProjection Get-SentEmails
        [-InboxId]
        [-Page]
        [-Size]
        [-Sort]
        [-SearchFilter]
        [-Since]
        [-Before]

Get all sent emails in paginated form

Example

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: API_KEY
$Configuration.ApiKey.x-api-key = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.x-api-key = "Bearer"

$InboxId = "InboxId_example" # String | Optional inboxId to filter sender of sent emails by (optional)
$Page = 987 # Int32 | Optional page  in inbox sent email list pagination (optional) (default to 0)
$Size = 987 # Int32 | Optional page size in inbox sent email list pagination (optional) (default to 20)
$Sort = "ASC" # String | Optional createdAt sort direction ASC or DESC (optional) (default to "ASC")
$SearchFilter = "SearchFilter_example" # String | Optional search filter (optional)
$Since = Get-Date # System.DateTime | Filter by created at after the given timestamp (optional)
$Before = Get-Date # System.DateTime | Filter by created at before the given timestamp (optional)

# Get all sent emails in paginated form
try {
     $Result = Get-SentEmails -InboxId $InboxId -Page $Page -Size $Size -Sort $Sort -SearchFilter $SearchFilter -Since $Since -Before $Before
} catch {
    Write-Host ("Exception occured when calling Get-SentEmails: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
InboxId String Optional inboxId to filter sender of sent emails by [optional]
Page Int32 Optional page in inbox sent email list pagination [optional] [default to 0]
Size Int32 Optional page size in inbox sent email list pagination [optional] [default to 20]
Sort String Optional createdAt sort direction ASC or DESC [optional] [default to "ASC"]
SearchFilter String Optional search filter [optional]
Since System.DateTime Filter by created at after the given timestamp [optional]
Before System.DateTime Filter by created at before the given timestamp [optional]

Return type

PageSentEmailProjection (PSCustomObject)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

PageSentEmailProjection Get-SentOrganizationEmails
        [-InboxId]
        [-Page]
        [-Size]
        [-Sort]
        [-SearchFilter]
        [-Since]
        [-Before]

Get all sent organization emails in paginated form

Example

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: API_KEY
$Configuration.ApiKey.x-api-key = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.x-api-key = "Bearer"

$InboxId = "InboxId_example" # String | Optional inboxId to filter sender of sent emails by (optional)
$Page = 987 # Int32 | Optional page  in sent email list pagination (optional) (default to 0)
$Size = 987 # Int32 | Optional page size in sent email list pagination (optional) (default to 20)
$Sort = "ASC" # String | Optional createdAt sort direction ASC or DESC (optional) (default to "ASC")
$SearchFilter = "SearchFilter_example" # String | Optional search filter (optional)
$Since = Get-Date # System.DateTime | Filter by created at after the given timestamp (optional)
$Before = Get-Date # System.DateTime | Filter by created at before the given timestamp (optional)

try {
     $Result = Get-SentOrganizationEmails -InboxId $InboxId -Page $Page -Size $Size -Sort $Sort -SearchFilter $SearchFilter -Since $Since -Before $Before
} catch {
    Write-Host ("Exception occured when calling Get-SentOrganizationEmails: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
InboxId String Optional inboxId to filter sender of sent emails by [optional]
Page Int32 Optional page in sent email list pagination [optional] [default to 0]
Size Int32 Optional page size in sent email list pagination [optional] [default to 20]
Sort String Optional createdAt sort direction ASC or DESC [optional] [default to "ASC"]
SearchFilter String Optional search filter [optional]
Since System.DateTime Filter by created at after the given timestamp [optional]
Before System.DateTime Filter by created at before the given timestamp [optional]

Return type

PageSentEmailProjection (PSCustomObject)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]