Test Store Smtp
curl --request POST \
--url https://api.vellaro.io/api/v1/admin/settings/email-delivery/smtp/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"host": "<string>",
"port": 123,
"username": "<string>",
"from_email": "jsmith@example.com",
"password": "<string>",
"from_name": "<string>",
"reply_to": "jsmith@example.com",
"to": "jsmith@example.com"
}
'import requests
url = "https://api.vellaro.io/api/v1/admin/settings/email-delivery/smtp/test"
payload = {
"host": "<string>",
"port": 123,
"username": "<string>",
"from_email": "jsmith@example.com",
"password": "<string>",
"from_name": "<string>",
"reply_to": "jsmith@example.com",
"to": "jsmith@example.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
host: '<string>',
port: 123,
username: '<string>',
from_email: 'jsmith@example.com',
password: '<string>',
from_name: '<string>',
reply_to: 'jsmith@example.com',
to: 'jsmith@example.com'
})
};
fetch('https://api.vellaro.io/api/v1/admin/settings/email-delivery/smtp/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vellaro.io/api/v1/admin/settings/email-delivery/smtp/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'host' => '<string>',
'port' => 123,
'username' => '<string>',
'from_email' => 'jsmith@example.com',
'password' => '<string>',
'from_name' => '<string>',
'reply_to' => 'jsmith@example.com',
'to' => 'jsmith@example.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vellaro.io/api/v1/admin/settings/email-delivery/smtp/test"
payload := strings.NewReader("{\n \"host\": \"<string>\",\n \"port\": 123,\n \"username\": \"<string>\",\n \"from_email\": \"jsmith@example.com\",\n \"password\": \"<string>\",\n \"from_name\": \"<string>\",\n \"reply_to\": \"jsmith@example.com\",\n \"to\": \"jsmith@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.vellaro.io/api/v1/admin/settings/email-delivery/smtp/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"host\": \"<string>\",\n \"port\": 123,\n \"username\": \"<string>\",\n \"from_email\": \"jsmith@example.com\",\n \"password\": \"<string>\",\n \"from_name\": \"<string>\",\n \"reply_to\": \"jsmith@example.com\",\n \"to\": \"jsmith@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vellaro.io/api/v1/admin/settings/email-delivery/smtp/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"host\": \"<string>\",\n \"port\": 123,\n \"username\": \"<string>\",\n \"from_email\": \"jsmith@example.com\",\n \"password\": \"<string>\",\n \"from_name\": \"<string>\",\n \"reply_to\": \"jsmith@example.com\",\n \"to\": \"jsmith@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"ok": true,
"to": "<string>",
"code": "<string>",
"smtp_code": 123
},
"meta": {
"page": 123,
"page_size": 123,
"total": 123,
"total_pages": 123
},
"error": "<string>",
"error_code": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Settings
Test Store Smtp
Una vera email di prova dal server del modulo (password omessa = quella salvata), nella lingua del negozio. Non salva niente.
- 422
email_smtp.<motivo>per i dati non ammessi (come il PUT) eemail_smtp.recipient_not_allowedsetonon è l’email di chi chiama né quella del negozio; - 200
{ok: true, to}se il server l’ha accettata; 200{ok: false, code: "email_smtp.<motivo>", smtp_code, to}se no.
POST
/
api
/
v1
/
admin
/
settings
/
email-delivery
/
smtp
/
test
Test Store Smtp
curl --request POST \
--url https://api.vellaro.io/api/v1/admin/settings/email-delivery/smtp/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"host": "<string>",
"port": 123,
"username": "<string>",
"from_email": "jsmith@example.com",
"password": "<string>",
"from_name": "<string>",
"reply_to": "jsmith@example.com",
"to": "jsmith@example.com"
}
'import requests
url = "https://api.vellaro.io/api/v1/admin/settings/email-delivery/smtp/test"
payload = {
"host": "<string>",
"port": 123,
"username": "<string>",
"from_email": "jsmith@example.com",
"password": "<string>",
"from_name": "<string>",
"reply_to": "jsmith@example.com",
"to": "jsmith@example.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
host: '<string>',
port: 123,
username: '<string>',
from_email: 'jsmith@example.com',
password: '<string>',
from_name: '<string>',
reply_to: 'jsmith@example.com',
to: 'jsmith@example.com'
})
};
fetch('https://api.vellaro.io/api/v1/admin/settings/email-delivery/smtp/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vellaro.io/api/v1/admin/settings/email-delivery/smtp/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'host' => '<string>',
'port' => 123,
'username' => '<string>',
'from_email' => 'jsmith@example.com',
'password' => '<string>',
'from_name' => '<string>',
'reply_to' => 'jsmith@example.com',
'to' => 'jsmith@example.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vellaro.io/api/v1/admin/settings/email-delivery/smtp/test"
payload := strings.NewReader("{\n \"host\": \"<string>\",\n \"port\": 123,\n \"username\": \"<string>\",\n \"from_email\": \"jsmith@example.com\",\n \"password\": \"<string>\",\n \"from_name\": \"<string>\",\n \"reply_to\": \"jsmith@example.com\",\n \"to\": \"jsmith@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.vellaro.io/api/v1/admin/settings/email-delivery/smtp/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"host\": \"<string>\",\n \"port\": 123,\n \"username\": \"<string>\",\n \"from_email\": \"jsmith@example.com\",\n \"password\": \"<string>\",\n \"from_name\": \"<string>\",\n \"reply_to\": \"jsmith@example.com\",\n \"to\": \"jsmith@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vellaro.io/api/v1/admin/settings/email-delivery/smtp/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"host\": \"<string>\",\n \"port\": 123,\n \"username\": \"<string>\",\n \"from_email\": \"jsmith@example.com\",\n \"password\": \"<string>\",\n \"from_name\": \"<string>\",\n \"reply_to\": \"jsmith@example.com\",\n \"to\": \"jsmith@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"ok": true,
"to": "<string>",
"code": "<string>",
"smtp_code": 123
},
"meta": {
"page": 123,
"page_size": 123,
"total": 123,
"total_pages": 123
},
"error": "<string>",
"error_code": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Autorizzazioni
Corpo
application/json