maislurp-client-powershell.maislurp-client-powershell/Api.EmailControllerApi
All URIs are relative to https://api.mailslurp.com
Method | HTTP request | Description |
---|---|---|
Invoke-ApplyImapFlagOperation | POST /emails/{emailId}/imap-flag-operation | Set IMAP flags associated with a message. Only supports 'Seen' flag. |
Invoke-DeleteAllEmails | DELETE /emails | Delete all emails in all inboxes. |
Invoke-DeleteEmail | DELETE /emails/{emailId} | Delete an email |
Invoke-DownloadAttachment | GET /emails/{emailId}/attachments/{attachmentId} | Get email attachment bytes. Returned as octet-stream with content type header. If you have trouble with byte responses try the downloadAttachmentBase64 response endpoints and convert the base 64 encoded content to a file or string. |
Invoke-DownloadAttachmentBase64 | GET /emails/{emailId}/attachments/{attachmentId}/base64 | Get email attachment as base64 encoded string as an alternative to binary responses. Decode the base64FileContents as a utf-8 encoded string or array of bytes depending on the contentType . |
Invoke-DownloadBody | GET /emails/{emailId}/body | Get email body as string. Returned as plain/text with content type header. |
Invoke-DownloadBodyBytes | GET /emails/{emailId}/body-bytes | Get email body in bytes. Returned as octet-stream with content type header. |
Invoke-ForwardEmail | POST /emails/{emailId}/forward | Forward email to recipients |
Get-AttachmentMetaData | GET /emails/{emailId}/attachments/{attachmentId}/metadata | Get email attachment metadata. This is the contentType and contentLength of an attachment. To get the individual attachments use the downloadAttachment methods. |
Get-Email | GET /emails/{emailId} | Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController. |
Get-EmailAttachments | GET /emails/{emailId}/attachments | Get all email attachment metadata. Metadata includes name and size of attachments. |
Get-EmailContentMatch | POST /emails/{emailId}/contentMatch | Get email content regex pattern match results. Runs regex against email body and returns match groups. |
Get-EmailCount | GET /emails/emails/count | Get email count |
Get-EmailHTML | GET /emails/{emailId}/html | Get email content as HTML. For displaying emails in browser context. |
Get-EmailHTMLJson | GET /emails/{emailId}/html/json | Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content |
Get-EmailHTMLQuery | GET /emails/{emailId}/htmlQuery | Parse and return text from an email, stripping HTML and decoding encoded characters |
Get-EmailLinks | GET /emails/{emailId}/links | Parse and return list of links found in an email (only works for HTML content) |
Get-EmailPreviewURLs | GET /emails/{emailId}/urls | Get email URLs for viewing in browser or downloading |
Get-EmailTextLines | GET /emails/{emailId}/textLines | Parse and return text from an email, stripping HTML and decoding encoded characters |
Get-EmailsPaginated | GET /emails | Get all emails in all inboxes in paginated form. Email API list all. |
Get-GravatarUrlForEmailAddress | GET /emails/gravatarFor | |
Get-LatestEmail | GET /emails/latest | Get latest email in all inboxes. Most recently received. |
Get-LatestEmailInInbox1 | GET /emails/latestIn | Get latest email in an inbox. Use WaitForController to get emails that may not have arrived yet. |
Get-OrganizationEmailsPaginated | GET /emails/organization | Get all organization emails. List team or shared test email accounts |
Get-RawEmailContents | GET /emails/{emailId}/raw | Get raw email string. Returns unparsed raw SMTP message with headers and body. |
Get-RawEmailJson | GET /emails/{emailId}/raw/json | Get raw email in JSON. Unparsed SMTP message in JSON wrapper format. |
Get-UnreadEmailCount | GET /emails/unreadCount | Get unread email count |
Invoke-MarkAsRead | PATCH /emails/{emailId}/read | Mark an email as read on unread |
Invoke-ReplyToEmail | PUT /emails/{emailId} | Reply to an email |
Send-EmailSourceOptional | POST /emails | Send email |
Confirm-Email | POST /emails/{emailId}/validate | Validate email HTML contents |
EmailPreview Invoke-ApplyImapFlagOperation
[-EmailId]
[-ImapFlagOperationOptions]
Set IMAP flags associated with a message. Only supports 'Seen' flag.
Apply RFC3501 section-2.3.2 IMAP flag operations on an email
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 |
$ImapFlagOperationOptions = (Initialize-ImapFlagOperationOptions -FlagOperation "SET_FLAGS" -Flags @("Flags_example")) # ImapFlagOperationOptions |
# Set IMAP flags associated with a message. Only supports 'Seen' flag.
try {
$Result = Invoke-ApplyImapFlagOperation -EmailId $EmailId -ImapFlagOperationOptions $ImapFlagOperationOptions
} catch {
Write-Host ("Exception occured when calling Invoke-ApplyImapFlagOperation: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
EmailId | String | ||
ImapFlagOperationOptions | ImapFlagOperationOptions |
Return type
EmailPreview (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
void Invoke-DeleteAllEmails
Delete all emails in all inboxes.
Deletes all emails in your account. Be careful as emails cannot be recovered
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 emails in all inboxes.
try {
$Result = Invoke-DeleteAllEmails
} catch {
Write-Host ("Exception occured when calling Invoke-DeleteAllEmails: {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
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-DeleteEmail
[-EmailId]
Delete an email
Deletes an email and removes it from the inbox. Deleted emails cannot be recovered.
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 to delete
# Delete an email
try {
$Result = Invoke-DeleteEmail -EmailId $EmailId
} catch {
Write-Host ("Exception occured when calling Invoke-DeleteEmail: {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 to delete |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to ]
SystemByte Invoke-DownloadAttachment
[-EmailId]
[-AttachmentId]
[-ApiKey]
Get email attachment bytes. Returned as octet-stream
with content type header. If you have trouble with byte responses try the downloadAttachmentBase64
response endpoints and convert the base 64 encoded content to a file or string.
Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.
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
$AttachmentId = "AttachmentId_example" # String | ID of attachment
$ApiKey = "ApiKey_example" # String | Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. (optional)
# Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string.
try {
$Result = Invoke-DownloadAttachment -EmailId $EmailId -AttachmentId $AttachmentId -ApiKey $ApiKey
} catch {
Write-Host ("Exception occured when calling Invoke-DownloadAttachment: {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 | |
AttachmentId | String | ID of attachment | |
ApiKey | String | Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. | [optional] |
Return type
SystemByte (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/octet-stream
[Back to top] [Back to API list] [Back to Model list] [Back to ]
DownloadAttachmentDto Invoke-DownloadAttachmentBase64
[-EmailId]
[-AttachmentId]
Get email attachment as base64 encoded string as an alternative to binary responses. Decode the base64FileContents
as a utf-8
encoded string or array of bytes depending on the contentType
.
Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the downloadAttachment
method but allows some clients to get around issues with binary responses.
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
$AttachmentId = "AttachmentId_example" # String | ID of attachment
# Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`.
try {
$Result = Invoke-DownloadAttachmentBase64 -EmailId $EmailId -AttachmentId $AttachmentId
} catch {
Write-Host ("Exception occured when calling Invoke-DownloadAttachmentBase64: {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 | |
AttachmentId | String | ID of attachment |
Return type
DownloadAttachmentDto (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
String Invoke-DownloadBody
[-EmailId]
Get email body as string. Returned as plain/text
with content type header.
Returns the specified email body for a given email as a string
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 email body as string. Returned as `plain/text` with content type header.
try {
$Result = Invoke-DownloadBody -EmailId $EmailId
} catch {
Write-Host ("Exception occured when calling Invoke-DownloadBody: {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
HTTP request headers
- Content-Type: Not defined
- Accept: text/plain, text/html
[Back to top] [Back to API list] [Back to Model list] [Back to ]
SystemByte Invoke-DownloadBodyBytes
[-EmailId]
Get email body in bytes. Returned as octet-stream
with content type header.
Returns the specified email body for a given email as a stream / array of bytes.
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 email body in bytes. Returned as `octet-stream` with content type header.
try {
$Result = Invoke-DownloadBodyBytes -EmailId $EmailId
} catch {
Write-Host ("Exception occured when calling Invoke-DownloadBodyBytes: {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
SystemByte (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/octet-stream
[Back to top] [Back to API list] [Back to Model list] [Back to ]
SentEmailDto Invoke-ForwardEmail
[-EmailId]
[-ForwardEmailOptions]
Forward email to recipients
Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the from
option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints.
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
$ForwardEmailOptions = (Initialize-ForwardEmailOptions -To @("To_example") -Subject "Subject_example" -Cc @("Cc_example") -Bcc @("Bcc_example") -VarFrom "VarFrom_example" -UseInboxName $false -FilterBouncedRecipients $false) # ForwardEmailOptions |
# Forward email to recipients
try {
$Result = Invoke-ForwardEmail -EmailId $EmailId -ForwardEmailOptions $ForwardEmailOptions
} catch {
Write-Host ("Exception occured when calling Invoke-ForwardEmail: {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 | |
ForwardEmailOptions | ForwardEmailOptions |
Return type
SentEmailDto (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
AttachmentMetaData Get-AttachmentMetaData
[-EmailId]
[-AttachmentId]
Get email attachment metadata. This is the contentType
and contentLength
of an attachment. To get the individual attachments use the downloadAttachment
methods.
Returns the metadata such as name and content-type for a given attachment and email.
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
$AttachmentId = "AttachmentId_example" # String | ID of attachment
# Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods.
try {
$Result = Get-AttachmentMetaData -EmailId $EmailId -AttachmentId $AttachmentId
} catch {
Write-Host ("Exception occured when calling Get-AttachmentMetaData: {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 | |
AttachmentId | String | ID of attachment |
Return type
AttachmentMetaData (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
Email Get-Email
[-EmailId]
[-Decode]
Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController.
Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints
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 |
$Decode = true # Boolean | Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance `=D7`). This can be a pain for testing (optional) (default to $false)
# Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController.
try {
$Result = Get-Email -EmailId $EmailId -Decode $Decode
} catch {
Write-Host ("Exception occured when calling Get-Email: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
EmailId | String | ||
Decode | Boolean | Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance =D7 ). This can be a pain for testing | [optional] [default to $false] |
Return type
Email (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
AttachmentMetaData[] Get-EmailAttachments
[-EmailId]
Get all email attachment metadata. Metadata includes name and size of attachments.
Returns an array of attachment metadata such as name and content-type for a given email if present.
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 all email attachment metadata. Metadata includes name and size of attachments.
try {
$Result = Get-EmailAttachments -EmailId $EmailId
} catch {
Write-Host ("Exception occured when calling Get-EmailAttachments: {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
AttachmentMetaData[] (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
EmailContentMatchResult Get-EmailContentMatch
[-EmailId]
[-ContentMatchOptions]
Get email content regex pattern match results. Runs regex against email body and returns match groups.
Return the matches for a given Java style regex pattern. Do not include the typical /
at start or end of regex in some languages. Given an example your code is: 12345
the pattern to extract match looks like code is: (d{6})
. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: ['code is: 123456', '123456']
See https://docs.oracle.com/javase/8/docs/api/java/util/regex/ for more information of available patterns.
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 to match against
$ContentMatchOptions = (Initialize-ContentMatchOptions -Pattern "Pattern_example") # ContentMatchOptions |
# Get email content regex pattern match results. Runs regex against email body and returns match groups.
try {
$Result = Get-EmailContentMatch -EmailId $EmailId -ContentMatchOptions $ContentMatchOptions
} catch {
Write-Host ("Exception occured when calling Get-EmailContentMatch: {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 to match against | |
ContentMatchOptions | ContentMatchOptions |
Return type
EmailContentMatchResult (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
CountDto Get-EmailCount
Get email count
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"
# Get email count
try {
$Result = Get-EmailCount
} catch {
Write-Host ("Exception occured when calling Get-EmailCount: {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
CountDto (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
String Get-EmailHTML
[-EmailId]
[-Decode]
Get email content as HTML. For displaying emails in browser context.
Retrieve email content as HTML response for viewing in browsers. Decodes quoted-printable entities and converts charset to UTF-8. Pass your API KEY as a request parameter when viewing in a browser: ?apiKey=xxx
. Returns content-type text/html;charset=utf-8
so you must call expecting that content response not JSON. For JSON response see the getEmailHTMLJson
method.
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 |
$Decode = true # Boolean | (optional) (default to $false)
# Get email content as HTML. For displaying emails in browser context.
try {
$Result = Get-EmailHTML -EmailId $EmailId -Decode $Decode
} catch {
Write-Host ("Exception occured when calling Get-EmailHTML: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
EmailId | String | ||
Decode | Boolean | [optional] [default to $false] |
Return type
String
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: text/html;charset=utf-8, text/html
[Back to top] [Back to API list] [Back to Model list] [Back to ]
EmailHtmlDto Get-EmailHTMLJson
[-EmailId]
[-Decode]
Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content
Retrieve email content as HTML response. Decodes quoted-printable entities and converts charset to UTF-8. Returns content-type application/json;charset=utf-8
so you must call expecting that content response not JSON.
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 |
$Decode = true # Boolean | (optional) (default to $false)
# Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content
try {
$Result = Get-EmailHTMLJson -EmailId $EmailId -Decode $Decode
} catch {
Write-Host ("Exception occured when calling Get-EmailHTMLJson: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
EmailId | String | ||
Decode | Boolean | [optional] [default to $false] |
Return type
EmailHtmlDto (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
EmailTextLinesResult Get-EmailHTMLQuery
[-EmailId]
[-HtmlSelector]
Parse and return text from an email, stripping HTML and decoding encoded characters
Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors
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 to perform HTML query on
$HtmlSelector = "HtmlSelector_example" # String | HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/ for more information.
# Parse and return text from an email, stripping HTML and decoding encoded characters
try {
$Result = Get-EmailHTMLQuery -EmailId $EmailId -HtmlSelector $HtmlSelector
} catch {
Write-Host ("Exception occured when calling Get-EmailHTMLQuery: {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 to perform HTML query on | |
HtmlSelector | String | HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/ for more information. |
Return type
EmailTextLinesResult (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
EmailLinksResult Get-EmailLinks
[-EmailId]
Parse and return list of links found in an email (only works for HTML content)
HTML parsing uses JSoup and UNIX line separators. Searches content for href attributes
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 to fetch text for
# Parse and return list of links found in an email (only works for HTML content)
try {
$Result = Get-EmailLinks -EmailId $EmailId
} catch {
Write-Host ("Exception occured when calling Get-EmailLinks: {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 to fetch text for |
Return type
EmailLinksResult (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
EmailPreviewUrls Get-EmailPreviewURLs
[-EmailId]
Get email URLs for viewing in browser or downloading
Get a list of URLs for 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"
$EmailId = "EmailId_example" # String |
# Get email URLs for viewing in browser or downloading
try {
$Result = Get-EmailPreviewURLs -EmailId $EmailId
} catch {
Write-Host ("Exception occured when calling Get-EmailPreviewURLs: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
EmailId | String |
Return type
EmailPreviewUrls (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
EmailTextLinesResult Get-EmailTextLines
[-EmailId]
[-DecodeHtmlEntities]
[-LineSeparator]
Parse and return text from an email, stripping HTML and decoding encoded characters
Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators.
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 to fetch text for
$DecodeHtmlEntities = true # Boolean | Decode HTML entities (optional)
$LineSeparator = "LineSeparator_example" # String | Line separator character (optional)
# Parse and return text from an email, stripping HTML and decoding encoded characters
try {
$Result = Get-EmailTextLines -EmailId $EmailId -DecodeHtmlEntities $DecodeHtmlEntities -LineSeparator $LineSeparator
} catch {
Write-Host ("Exception occured when calling Get-EmailTextLines: {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 to fetch text for | |
DecodeHtmlEntities | Boolean | Decode HTML entities | [optional] |
LineSeparator | String | Line separator character | [optional] |
Return type
EmailTextLinesResult (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
PageEmailProjection Get-EmailsPaginated
[-InboxId]
[-Page]
[-Size]
[-Sort]
[-UnreadOnly]
[-SearchFilter]
[-Since]
[-Before]
Get all emails in all inboxes in paginated form. Email API list all.
By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages
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 = @("Inner_example") # String[] | Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional)
$Page = 987 # Int32 | Optional page in email list pagination (optional) (default to 0)
$Size = 987 # Int32 | Optional page size in email list pagination. Maximum size is 100. Use page and sort to page through larger results (optional) (default to 20)
$Sort = "ASC" # String | Optional createdAt sort direction ASC or DESC (optional) (default to "ASC")
$UnreadOnly = true # Boolean | Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional) (default to $false)
$SearchFilter = "SearchFilter_example" # String | Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body (optional)
$Since = Get-Date # System.DateTime | Optional filter emails received after given date time (optional)
$Before = Get-Date # System.DateTime | Optional filter emails received before given date time (optional)
# Get all emails in all inboxes in paginated form. Email API list all.
try {
$Result = Get-EmailsPaginated -InboxId $InboxId -Page $Page -Size $Size -Sort $Sort -UnreadOnly $UnreadOnly -SearchFilter $SearchFilter -Since $Since -Before $Before
} catch {
Write-Host ("Exception occured when calling Get-EmailsPaginated: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
InboxId | String[] | Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. | [optional] |
Page | Int32 | Optional page in email list pagination | [optional] [default to 0] |
Size | Int32 | Optional page size in email list pagination. Maximum size is 100. Use page and sort to page through larger results | [optional] [default to 20] |
Sort | String | Optional createdAt sort direction ASC or DESC | [optional] [default to "ASC"] |
UnreadOnly | Boolean | Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly | [optional] [default to $false] |
SearchFilter | String | Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body | [optional] |
Since | System.DateTime | Optional filter emails received after given date time | [optional] |
Before | System.DateTime | Optional filter emails received before given date time | [optional] |
Return type
PageEmailProjection (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
GravatarUrl Get-GravatarUrlForEmailAddress
[-EmailAddress]
[-Size]
Get gravatar url for email address
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"
$EmailAddress = "EmailAddress_example" # String |
$Size = "Size_example" # String | (optional)
try {
$Result = Get-GravatarUrlForEmailAddress -EmailAddress $EmailAddress -Size $Size
} catch {
Write-Host ("Exception occured when calling Get-GravatarUrlForEmailAddress: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
EmailAddress | String | ||
Size | String | [optional] |
Return type
GravatarUrl (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
Email Get-LatestEmail
[-InboxIds]
Get latest email in all inboxes. Most recently received.
Get the newest email in all inboxes or in a passed set of inbox IDs
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"
$InboxIds = @("Inner_example") # String[] | Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes (optional)
# Get latest email in all inboxes. Most recently received.
try {
$Result = Get-LatestEmail -InboxIds $InboxIds
} catch {
Write-Host ("Exception occured when calling Get-LatestEmail: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
InboxIds | String[] | Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes | [optional] |
Return type
Email (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
Email Get-LatestEmailInInbox1
[-InboxId]
Get latest email in an inbox. Use WaitForController
to get emails that may not have arrived yet.
Get the newest email in all inboxes or in a passed set of inbox IDs
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 | ID of the inbox you want to get the latest email from
# Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet.
try {
$Result = Get-LatestEmailInInbox1 -InboxId $InboxId
} catch {
Write-Host ("Exception occured when calling Get-LatestEmailInInbox1: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
InboxId | String | ID of the inbox you want to get the latest email from |
Return type
Email (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
PageEmailProjection Get-OrganizationEmailsPaginated
[-InboxId]
[-Page]
[-Size]
[-Sort]
[-UnreadOnly]
[-SearchFilter]
[-Since]
[-Before]
Get all organization emails. List team or shared test email accounts
By default returns all emails across all team inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages
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 = @("Inner_example") # String[] | Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional)
$Page = 987 # Int32 | Optional page in email list pagination (optional) (default to 0)
$Size = 987 # Int32 | Optional page size in email list pagination. Maximum size is 100. Use page and sort to page through larger results (optional) (default to 20)
$Sort = "ASC" # String | Optional createdAt sort direction ASC or DESC (optional) (default to "ASC")
$UnreadOnly = true # Boolean | Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional) (default to $false)
$SearchFilter = "SearchFilter_example" # String | Optional search filter search filter for emails. (optional)
$Since = Get-Date # System.DateTime | Optional filter emails received after given date time (optional)
$Before = Get-Date # System.DateTime | Optional filter emails received before given date time (optional)
# Get all organization emails. List team or shared test email accounts
try {
$Result = Get-OrganizationEmailsPaginated -InboxId $InboxId -Page $Page -Size $Size -Sort $Sort -UnreadOnly $UnreadOnly -SearchFilter $SearchFilter -Since $Since -Before $Before
} catch {
Write-Host ("Exception occured when calling Get-OrganizationEmailsPaginated: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
InboxId | String[] | Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. | [optional] |
Page | Int32 | Optional page in email list pagination | [optional] [default to 0] |
Size | Int32 | Optional page size in email list pagination. Maximum size is 100. Use page and sort to page through larger results | [optional] [default to 20] |
Sort | String | Optional createdAt sort direction ASC or DESC | [optional] [default to "ASC"] |
UnreadOnly | Boolean | Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly | [optional] [default to $false] |
SearchFilter | String | Optional search filter search filter for emails. | [optional] |
Since | System.DateTime | Optional filter emails received after given date time | [optional] |
Before | System.DateTime | Optional filter emails received before given date time | [optional] |
Return type
PageEmailProjection (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
String Get-RawEmailContents
[-EmailId]
Get raw email string. Returns unparsed raw SMTP message with headers and body.
Returns a raw, unparsed, and unprocessed 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 getRawEmailJson 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 email string. Returns unparsed raw SMTP message with headers and body.
try {
$Result = Get-RawEmailContents -EmailId $EmailId
} catch {
Write-Host ("Exception occured when calling Get-RawEmailContents: {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
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-RawEmailJson
[-EmailId]
Get raw email in JSON. Unparsed SMTP message in JSON wrapper format.
Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail 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 email in JSON. Unparsed SMTP message in JSON wrapper format.
try {
$Result = Get-RawEmailJson -EmailId $EmailId
} catch {
Write-Host ("Exception occured when calling Get-RawEmailJson: {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
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
UnreadCount Get-UnreadEmailCount
Get unread email count
Get number of emails unread. Unread means has not been viewed in dashboard or returned in an email API 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"
# Get unread email count
try {
$Result = Get-UnreadEmailCount
} catch {
Write-Host ("Exception occured when calling Get-UnreadEmailCount: {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
UnreadCount (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
EmailPreview Invoke-MarkAsRead
[-EmailId]
[-Read]
Mark an email as read on unread
Marks an email as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread
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 |
$Read = true # Boolean | What value to assign to email read property. Default true. (optional) (default to $true)
# Mark an email as read on unread
try {
$Result = Invoke-MarkAsRead -EmailId $EmailId -Read $Read
} catch {
Write-Host ("Exception occured when calling Invoke-MarkAsRead: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
EmailId | String | ||
Read | Boolean | What value to assign to email read property. Default true. | [optional] [default to $true] |
Return type
EmailPreview (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
SentEmailDto Invoke-ReplyToEmail
[-EmailId]
[-ReplyToEmailOptions]
Reply to an email
Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails to
, cc
, and bcc
.
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 the email that should be replied to
$ReplyToEmailOptions = (Initialize-ReplyToEmailOptions -Body "Body_example" -IsHTML $false -VarFrom "VarFrom_example" -ReplyTo "ReplyTo_example" -Charset "Charset_example" -Attachments @("Attachments_example") -TemplateVariables "TODO" -Template "Template_example" -SendStrategy "SINGLE_MESSAGE" -UseInboxName $false -Html $false) # ReplyToEmailOptions |
# Reply to an email
try {
$Result = Invoke-ReplyToEmail -EmailId $EmailId -ReplyToEmailOptions $ReplyToEmailOptions
} catch {
Write-Host ("Exception occured when calling Invoke-ReplyToEmail: {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 the email that should be replied to | |
ReplyToEmailOptions | ReplyToEmailOptions |
Return type
SentEmailDto (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
void Send-EmailSourceOptional
[-SendEmailOptions]
[-InboxId]
[-UseDomainPool]
[-VirtualSend]
Send email
Alias for InboxController.sendEmail
method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email.
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"
$SendEmailOptions = (Initialize-SendEmailOptions -ToContacts @("ToContacts_example") -ToGroup "ToGroup_example" -To @("To_example") -VarFrom "VarFrom_example" -Cc @("Cc_example") -Bcc @("Bcc_example") -Subject "Subject_example" -ReplyTo "ReplyTo_example" -Body "Body_example" -Html $false -IsHTML $false -Charset "Charset_example" -Attachments @("Attachments_example") -TemplateVariables "TODO" -Template "Template_example" -SendStrategy "SINGLE_MESSAGE" -UseInboxName $false -AddTrackingPixel $false -FilterBouncedRecipients $false -ValidateEmailAddresses "VALIDATE_FILTER_REMOVE_INVALID") # SendEmailOptions |
$InboxId = "InboxId_example" # String | ID of the inbox you want to send the email from (optional)
$UseDomainPool = true # Boolean | Use domain pool. Optionally create inbox to send from using the mailslurp domain pool. (optional)
$VirtualSend = true # Boolean | Optionally create inbox to send from that is a virtual inbox and won't send to external addresses (optional)
# Send email
try {
$Result = Send-EmailSourceOptional -SendEmailOptions $SendEmailOptions -InboxId $InboxId -UseDomainPool $UseDomainPool -VirtualSend $VirtualSend
} catch {
Write-Host ("Exception occured when calling Send-EmailSourceOptional: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
SendEmailOptions | SendEmailOptions | ||
InboxId | String | ID of the inbox you want to send the email from | [optional] |
UseDomainPool | Boolean | Use domain pool. Optionally create inbox to send from using the mailslurp domain pool. | [optional] |
VirtualSend | Boolean | Optionally create inbox to send from that is a virtual inbox and won't send to external addresses | [optional] |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to ]
ValidationDto Confirm-Email
[-EmailId]
Validate email HTML contents
Validate the HTML content of email if HTML is found. Considered valid if no HTML is present.
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
# Validate email HTML contents
try {
$Result = Confirm-Email -EmailId $EmailId
} catch {
Write-Host ("Exception occured when calling Confirm-Email: {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
ValidationDto (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]