Test SMTP server
curl --request POST \
--url https://apix.spotzee.com/api/ext/generic/email/smtp-server-test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data hostname_ip=www.example.comimport requests
url = "https://apix.spotzee.com/api/ext/generic/email/smtp-server-test"
payload = { "hostname_ip": "www.example.com" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({hostname_ip: 'www.example.com'})
};
fetch('https://apix.spotzee.com/api/ext/generic/email/smtp-server-test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apix.spotzee.com/api/ext/generic/email/smtp-server-test"
payload := strings.NewReader("hostname_ip=www.example.com")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "success",
"data": {
"connection": "success",
"details": {
"hostname": "<string>",
"port": 123,
"security": "<string>",
"response": "220 smtp.example.com ESMTP ready",
"features": [
"STARTTLS",
"AUTH LOGIN",
"AUTH PLAIN",
"SIZE 35882577"
]
},
"error": "<string>"
}
}{
"status": "error",
"error": "Invalid request parameters"
}{
"status": "error",
"error": "Invalid request parameters"
}{
"status": "error",
"error": "Invalid request parameters"
}{
"status": "error",
"error": "Invalid request parameters"
}{
"status": "error",
"error": "Invalid request parameters"
}{
"status": "error",
"error": "Invalid request parameters"
}Email
Test SMTP server
Tests connectivity to an SMTP server by attempting to establish a connection. Useful for verifying mail server availability and basic configuration.
POST
/
generic
/
email
/
smtp-server-test
Test SMTP server
curl --request POST \
--url https://apix.spotzee.com/api/ext/generic/email/smtp-server-test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data hostname_ip=www.example.comimport requests
url = "https://apix.spotzee.com/api/ext/generic/email/smtp-server-test"
payload = { "hostname_ip": "www.example.com" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({hostname_ip: 'www.example.com'})
};
fetch('https://apix.spotzee.com/api/ext/generic/email/smtp-server-test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apix.spotzee.com/api/ext/generic/email/smtp-server-test"
payload := strings.NewReader("hostname_ip=www.example.com")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "success",
"data": {
"connection": "success",
"details": {
"hostname": "<string>",
"port": 123,
"security": "<string>",
"response": "220 smtp.example.com ESMTP ready",
"features": [
"STARTTLS",
"AUTH LOGIN",
"AUTH PLAIN",
"SIZE 35882577"
]
},
"error": "<string>"
}
}{
"status": "error",
"error": "Invalid request parameters"
}{
"status": "error",
"error": "Invalid request parameters"
}{
"status": "error",
"error": "Invalid request parameters"
}{
"status": "error",
"error": "Invalid request parameters"
}{
"status": "error",
"error": "Invalid request parameters"
}{
"status": "error",
"error": "Invalid request parameters"
}Authorizations
Bearer token authentication. Use format: Bearer YOUR_API_KEY
Body
application/x-www-form-urlencoded
Hostname
Example:
"www.example.com"
Response
Successfully tested SMTP server
Indicates successful operation
Available options:
success Hide child attributes
Hide child attributes
Connection test result
Available options:
success Hide child attributes
Hide child attributes
Was this page helpful?
⌘I