maislurp-client-powershell.maislurp-client-powershell/Api.CommonActionsControllerApi

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

MethodHTTP requestDescription
New-NewEmailAddressPOST /createInboxCreate new random inbox
New-NewEmailAddress1POST /newEmailAddressCreate new random inbox
Invoke-EmptyInboxDELETE /emptyInboxDelete all emails in an inbox
Send-EmailSimplePOST /sendEmailSend an email

New-NewEmailAddress

Inbox New-NewEmailAddress         [-AllowTeamAccess] <System.Nullable[Boolean]>         [-ExpiresAt] <System.Nullable[System.DateTime]>         [-ExpiresIn] <System.Nullable[Int64]>         [-UseDomainPool] <System.Nullable[Boolean]>

Create new random inbox

Returns an Inbox with an id and an emailAddress

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"

$AllowTeamAccess = true # Boolean | allowTeamAccess (optional)
$ExpiresAt = Get-Date # System.DateTime | expiresAt (optional)
$ExpiresIn = 987 # Int64 | expiresIn (optional)
$UseDomainPool = true # Boolean | useDomainPool (optional)

# Create new random inbox
try {
     $Result = New-NewEmailAddress -AllowTeamAccess $AllowTeamAccess -ExpiresAt $ExpiresAt -ExpiresIn $ExpiresIn -UseDomainPool $UseDomainPool
} catch {
    Write-Host ("Exception occured when calling New-NewEmailAddress: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

NameTypeDescriptionNotes
AllowTeamAccessBooleanallowTeamAccess[optional]
ExpiresAtSystem.DateTimeexpiresAt[optional]
ExpiresInInt64expiresIn[optional]
UseDomainPoolBooleanuseDomainPool[optional]

Return type

Inbox (PSCustomObject)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

New-NewEmailAddress1

Inbox New-NewEmailAddress1         [-AllowTeamAccess] <System.Nullable[Boolean]>         [-ExpiresAt] <System.Nullable[System.DateTime]>         [-ExpiresIn] <System.Nullable[Int64]>         [-UseDomainPool] <System.Nullable[Boolean]>

Create new random inbox

Returns an Inbox with an id and an emailAddress

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"

$AllowTeamAccess = true # Boolean | allowTeamAccess (optional)
$ExpiresAt = Get-Date # System.DateTime | expiresAt (optional)
$ExpiresIn = 987 # Int64 | expiresIn (optional)
$UseDomainPool = true # Boolean | useDomainPool (optional)

# Create new random inbox
try {
     $Result = New-NewEmailAddress1 -AllowTeamAccess $AllowTeamAccess -ExpiresAt $ExpiresAt -ExpiresIn $ExpiresIn -UseDomainPool $UseDomainPool
} catch {
    Write-Host ("Exception occured when calling New-NewEmailAddress1: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

NameTypeDescriptionNotes
AllowTeamAccessBooleanallowTeamAccess[optional]
ExpiresAtSystem.DateTimeexpiresAt[optional]
ExpiresInInt64expiresIn[optional]
UseDomainPoolBooleanuseDomainPool[optional]

Return type

Inbox (PSCustomObject)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

Invoke-EmptyInbox

void Invoke-EmptyInbox         [-InboxId]

Delete all emails in an inbox

Deletes all emails

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 | inboxId

# Delete all emails in an inbox
try {
     $Result = Invoke-EmptyInbox -InboxId $InboxId
} catch {
    Write-Host ("Exception occured when calling Invoke-EmptyInbox: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

NameTypeDescriptionNotes
InboxIdStringinboxId

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 ]

Send-EmailSimple

void Send-EmailSimple         [-EmailOptions]

Send an email

If no senderId or inboxId provided a random email address will be used to send from.

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"

$EmailOptions = (Initialize-SimpleSendEmailOptions -Body "Body_example" -SenderId "SenderId_example" -Subject "Subject_example" -To "To_example") # SimpleSendEmailOptions | emailOptions

# Send an email
try {
     $Result = Send-EmailSimple -EmailOptions $EmailOptions
} catch {
    Write-Host ("Exception occured when calling Send-EmailSimple: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

NameTypeDescriptionNotes
EmailOptionsSimpleSendEmailOptionsemailOptions

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

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