maislurp-client-powershell.maislurp-client-powershell/Api.MailServerControllerApi

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

MethodHTTP requestDescription
Invoke-DescribeMailServerDomainPOST /mail-server/describe/domainGet DNS Mail Server records for a domain
Get-DnsLookupPOST /mail-server/describe/dns-lookupLookup DNS records for a domain
Get-IpAddressPOST /mail-server/describe/ip-addressGet IP address for a domain
Test-EmailAddressPOST /mail-server/verify/email-addressVerify the existence of an email address at a given mail server.

Invoke-DescribeMailServerDomain

DescribeMailServerDomainResult Invoke-DescribeMailServerDomain         [-DescribeOptions]

Get DNS Mail Server records for a domain

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"

$DescribeOptions = (Initialize-DescribeDomainOptions -Domain "Domain_example") # DescribeDomainOptions | describeOptions

# Get DNS Mail Server records for a domain
try {
     $Result = Invoke-DescribeMailServerDomain -DescribeOptions $DescribeOptions
} catch {
    Write-Host ("Exception occured when calling Invoke-DescribeMailServerDomain: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

NameTypeDescriptionNotes
DescribeOptionsDescribeDomainOptionsdescribeOptions

Return type

DescribeMailServerDomainResult (PSCustomObject)

Authorization

API_KEY

HTTP request headers

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

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

Get-DnsLookup

DNSLookupResults Get-DnsLookup         [-DnsLookupOptions]

Lookup DNS records for a domain

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"

$DnsLookupOptions = (Initialize-DNSLookupOptions -Hostname "Hostname_example" -OmitFinalDNSDot $false -RecordTypes @("A")) # DNSLookupOptions | dnsLookupOptions

# Lookup DNS records for a domain
try {
     $Result = Get-DnsLookup -DnsLookupOptions $DnsLookupOptions
} catch {
    Write-Host ("Exception occured when calling Get-DnsLookup: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

NameTypeDescriptionNotes
DnsLookupOptionsDNSLookupOptionsdnsLookupOptions

Return type

DNSLookupResults (PSCustomObject)

Authorization

API_KEY

HTTP request headers

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

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

Get-IpAddress

IPAddressResult Get-IpAddress         [-Name]

Get IP address for a domain

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"

$Name = "Name_example" # String | name

# Get IP address for a domain
try {
     $Result = Get-IpAddress -Name $Name
} catch {
    Write-Host ("Exception occured when calling Get-IpAddress: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

NameTypeDescriptionNotes
NameStringname

Return type

IPAddressResult (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 ]

Test-EmailAddress

EmailVerificationResult Test-EmailAddress         [-VerifyOptions]

Verify the existence of an email address at a given mail server.

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"

$VerifyOptions = (Initialize-VerifyEmailAddressOptions -MailServerDomain "MailServerDomain_example" -EmailAddress "EmailAddress_example" -SenderEmailAddress "SenderEmailAddress_example" -Port 123) # VerifyEmailAddressOptions | verifyOptions

# Verify the existence of an email address at a given mail server.
try {
     $Result = Test-EmailAddress -VerifyOptions $VerifyOptions
} catch {
    Write-Host ("Exception occured when calling Test-EmailAddress: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

NameTypeDescriptionNotes
VerifyOptionsVerifyEmailAddressOptionsverifyOptions

Return type

EmailVerificationResult (PSCustomObject)

Authorization

API_KEY

HTTP request headers

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

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