Email API per sviluppatori: massimizza l'efficienza nella consegna delle email
L'Email API di TurboSMTP rivoluziona il tuo workflow di sviluppo, offrendo un'integrazione rapida e una consegna istantanea delle email. Scopri quanto è semplice integrarla in qualsiasi applicazione o sito web grazie alla nostra documentazione API: inviare email su larga scala non è mai stato così immediato.
Email API per sviluppatori, pensata dagli sviluppatori
L'Email API di TurboSMTP rende semplicissima l'integrazione dei servizi email nella tua applicazione. Con un'API intuitiva, un'integrazione senza attrito e una documentazione completa, puoi scalare rapidamente l'invio delle email, che si tratti di 2 messaggi o 2 milioni. Di seguito trovi alcuni esempi pratici per integrare le nostre API con i linguaggi di programmazione più diffusi.
curl -X "POST"^
"https://api.turbo-smtp.com/api/v2/mail/send" ^
-H "accept: application/json" ^
-H "consumerKey: <CONSUMER_KEY>" ^
-H "consumerSecret: <CONSUMER_SECRET>" ^
-H "Content-Type: application/json" ^
-d ^
"{^
""from"": ""hello@your-company.com"",^
""to"": ""Doe.Jhon@gmail.com,contact@global-travel.com"",^
""subject"": ""New live training session"",^
""cc"": ""cc_user@example.com"",^
""bcc"": ""bcc_user@example.com"",^
""content"": ""Dear partner, we are delighted to invite you to an exclusive training session on UX Design. This session is designed to provide essential insights and practical strategies to enhance your skills."",^
""html_content"": ""Dear partner, we are delighted to invite you to an exclusive training session on UX Design. This session is designed to provide essential insights and practical strategies to enhance your skills.""^
}"curl -X 'POST' \
'https://api.turbo-smtp.com/api/v2/mail/send' \
-H 'accept: application/json' \
-H 'consumerKey: <CONSUMER_KEY>' \
-H 'consumerSecret: <CONSUMER_SECRET>' \
-H 'Content-Type: application/json' \
-d '{
"from": "hello@your-company.com",
"to": "Doe.Jhon@gmail.com,contact@global-travel.com",
"subject": "New live training session",
"cc": "cc_user@example.com",
"bcc": "bcc_user@example.com",
"content": "Dear partner,\nWe are delighted to invite you to an exclusive training session on UX Design. This session is designed to provide essential insights and practical strategies to enhance your skills.",
"html_content": "Dear partner,\nWe are delighted to invite you to an exclusive training session on <strong>UX Design</strong>. This session is designed to provide essential insights and practical strategies to enhance your skills."
}'curl.exe -X 'POST' `
'https://api.turbo-smtp.com/api/v2/mail/send' `
-H 'accept: application/json' `
-H 'consumerKey: <CONSUMER_KEY>' `
-H 'consumerSecret: <CONSUMER_SECRET>' `
-H 'Content-Type: application/json' `
-d @"
{
\"from\": \"hello@your-company.com\",
\"to\": \"Doe.Jhon@gmail.com,contact@global-travel.com\",
\"subject\": \"New live training session\",
\"cc\": \"cc_user@example.com\",
\"bcc\": \"bcc_user@example.com\",
\"content\": \"Dear partner,\nWe are delighted to invite you to an exclusive training session on UX Design. This session is designed to provide essential insights and practical strategies to enhance your skills.\",
\"html_content\": \"Dear partner,\nWe are delighted to invite you to an exclusive training session on <strong>UX Design</strong>. This session is designed to provide essential insights and practical strategies to enhance your skills.\"
}
"@using System.Text;
using System.Text.Json;
public class Program
{
public static async Task Main(string[] args)
{
var consumerKey = "<CONSUMER_KEY>";
var consumerSecret = "<CONSUMER_SECRET>";
string url = "https://api.turbo-smtp.com/api/v2/mail/send";
var mailData = new {
from = "hello@your-company.com",
to = "Doe.Jhon@gmail.com,contact@global-travel.com",
subject = "New live training session",
cc = "cc_user@example.com",
bcc = "bcc_user@example.com",
content = "Dear partner, we are delighted to invite you to an exclusive training session on UX Design. This session is designed to provide essential insights and practical strategies to enhance your skills.",
html_content = "Dear partner, We are delighted to invite you to an exclusive training session on <strong>UX Design</strong>. This session is designed to provide essential insights and practical strategies to enhance your skills."
}; // Mail Data setup.
using (HttpClient httpClient = new HttpClient())
{
// JSON data seriaization
var json = JsonSerializer.Serialize(mailData);
var content = new StringContent(json, Encoding.UTF8, "application/json");
// Set authentication headers
content.Headers.Add("consumerKey", consumerKey);
content.Headers.Add("consumerSecret", consumerSecret);
// Trigger POST request
using (var response = await httpClient.PostAsync(url, content))
{
if (response.IsSuccessStatusCode)
{
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine("Response: " + result);
}
else
{
Console.WriteLine("Request error: " + response.StatusCode);
}
}
}
}
}package main
import (
"bytes"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
// setup.
url := "https://api.turbo-smtp.com/api/v2/mail/send"
consumerkey := "<CONSUMER_KEY>"
consumerSecret := "<CONSUMER_SECRET>"
// Body Data.
data := []byte(`{
"from": "hello@your-company.com",
"to": "Doe.Jhon@gmail.com,contact@global-travel.com",
"subject": "New live training session",
"cc": "cc_user@example.com",
"bcc": "bcc_user@example.com",
"content": "Dear partner,\nWe are delighted to invite you to an exclusive training session on UX Design. This session is designed to provide essential insights and practical strategies to enhance your skills.",
"html_content": "Dear partner,\nWe are delighted to invite you to an exclusive training session on <strong>UX Design</strong>. This session is designed to provide essential insights and practical strategies to enhance your skills."
}`)
// Create POST Resquest.
req, err := http.NewRequest("POST", url, bytes.NewBuffer(data))
if err != nil {
fmt.Println("An Error has occured:", err)
return
}
// Set Request Headers.
req.Header.Set("Content-Type", "application/json")
req.Header.Set("accept", "application/json")
req.Header.Set("consumerKey", consumerkey)
req.Header.Set("consumerSecret", consumerSecret)
// Perform HTTP Request.
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("An Error has occured sending the request:", err)
return
}
defer resp.Body.Close()
// Read Server Response
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
fmt.Println("An Error has occured reading the server response:", err)
return
}
// Print Server Response
fmt.Println(string(body))
}const https = require('https');
//setup credentials.
const consumerKey = '<CONSUMER_KEY>';
const consumerSecret = '<CONSUMER_SECRET>';
//setup body.
const sendData = {
from: 'hello@your-company.com',
to: 'Doe.Jhon@gmail.com,contact@global-travel.com',
subject: 'New live training session',
cc: 'cc_user@example.com',
bcc: 'bcc_user@example.com',
content: 'Dear partner,\nWe are delighted to invite you to an exclusive training session on UX Design. This session is designed to provide essential insights and practical strategies to enhance your skills.',
html_content: 'Dear partner, <br>We are delighted to invite you to an exclusive training session on <strong>UX Design</strong>. This session is designed to provide essential insights and practical strategies to enhance your skills.',
};
//setup request options.
const options = {
hostname: 'api.turbo-smtp.com',
path: '/api/v2/mail/send',
method: 'POST',
headers: {
'Accept': 'application/json',
'Consumerkey': consumerKey,
'Consumersecret': consumerSecret,
'Content-Type': 'application/json',
},
};
//perform http request
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log('Response:', responseData);
});
});
//handle request error.
req.on('error', (error) => {
console.error('Error:', error.message);
});
//write response.
req.write(JSON.stringify(sendData));
req.end();import http.client
import json
# setup credentials.
consumerKey = '<CONSUMER_KEY>'
consumerSecret = '<CONSUMER_SECRET>'
# setup body.
data = {
'from': 'hello@your-company.com',
'to': 'Doe.Jhon@gmail.com,contact@global-travel.com',
'subject': 'New live training session',
'cc': 'cc_user@example.com',
'bcc': 'bcc_user@example.com',
'content': 'Dear partner,\nWe are delighted to invite you to an exclusive training session on UX Design. This session is designed to provide essential insights and practical strategies to enhance your skills.',
'html_content': 'Dear partner, <br>We are delighted to invite you to an exclusive training session on <strong>UX Design</strong>. This session is designed to provide essential insights and practical strategies to enhance your skills.'
}
# convert body to json.
data_json = json.dumps(data)
# setup headers
headers = {
'Accept': 'application/json',
'Consumerkey': consumerKey,
'Consumersecret': consumerSecret,
'Content-Type': 'application/json',
}
# Setup URL and endpoint
url = 'api.turbo-smtp.com'
endpoint = '/api/v2/mail/send'
# Create HTTP connection.
conn = http.client.HTTPConnection(url)
# Perform POST request.
try:
conn.request('POST', endpoint, body=data_json, headers=headers)
response = conn.getresponse()
# Read Server response.
response_data = response.read().decode('utf-8')
print(response_data)
# Close connection.
conn.close()
except http.client.HTTPException as e:
# Handle HTTP errors
print('Error on HTTP request:', e)
except ConnectionError as e:
# Handle Connection errors
print('Error on HTTP connection:', e)require 'net/https'
require 'uri'
# URL of the endpoint you want to send the POST request to
url = URI.parse('https://api.turbo-smtp.com/api/v2/mail/send')
consumerKey = "<CONSUMER_KEY>";
consumerSecret = "<CONSUMER_SECRET>";
# Data to send in the request body
data = {
'from' => 'hello@your-company.com',
'to' => 'Doe.Jhon@gmail.com,contact@global-travel.com',
'subject' => 'New live training session',
'cc' => 'cc_user@example.com',
'bcc' => 'bcc_user@example.com',
'content' => 'Dear partner,\nWe are delighted to invite you to an exclusive training session on UX Design. This session is designed to provide essential insights and practical strategies to enhance your skills.',
'html_content' => 'Dear partner, <br>We are delighted to invite you to an exclusive training session on <strong>UX Design</strong>. This session is designed to provide essential insights and practical strategies to enhance your skills.'
}
# Create the HTTPS connection
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
# Create the request object
request = Net::HTTP::Post.new(url.path)
request["Consumerkey"] = consumerKey
request["Consumersecret"] = consumerSecret
request["Content-Type"] = "application/json"
request["Accept"] = "application/json"
request.set_form_data(data)
# Send the request and get the response
response = http.request(request)
# Print the response body
puts response.body<?php
$send_data = [
"from" => "hello@your-company.com",
"to" => "Doe.Jhon@gmail.com,contact@global-travel.com",
"subject" => "New live training session",
"cc" => "cc_user@example.com",
"bcc" => "bcc_user@example.com",
"content" => "Dear partner,\n We are delighted to invite you to an exclusive training session on UX Design. This session is designed to provide essential insights and practical strategies to enhance your skills.",
"html_content" => "Dear partner,<br />We are delighted to invite you to an exclusive training session on <strong>UX Design</strong>. This session is designed to provide essential insights and practical strategies to enhance your skills."
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.turbo-smtp.com/api/v2/mail/send');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($send_data));
$headers = array();
$headers[] = 'Accept: application/json';
$headers[] = 'Consumerkey: <CONSUMER_KEY>';
$headers[] = 'Consumersecret: <CONSUMER_SECRET>';
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else if ($http_code !== 200) {
echo "Request error: ".$http_code;
} else {
echo "Response: ".$result;
}
curl_close($ch);import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class TurboSMTPMailExample {
public static void main(String[] args) {
try {
// Specify the URL of the API endpoint
URL url = new URL("https://api.turbo-smtp.com/api/v2/mail/send");
// Specify Credentials
String Consumerkey = "<CONSUMER_KEY>";
String Consumersecret = "<CONSUMER_SECRET>";
// Open a connection to the URL
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
// Set the request method to POST
connection.setRequestMethod("GET");
// Set the request headers
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("Consumerkey", Consumerkey);
connection.setRequestProperty("Consumersecret", Consumersecret);
// Enable input and output streams
connection.setDoInput(true);
connection.setDoOutput(true);
// Define the request body (as JSON)
//String requestBody = "{\"from\": \"user@example.com\", \"to\": \"user@example.com,user2@example.com\", \"subject\": \"This is a test message\"}";
String requestBody = "{" +
"\"from\": \"user@example.com\", " +
"\"to\": \"user@example.com,user2@example.com\", " +
"\"subject\": \"This is a test message\", " +
"\"cc\": \"cc_user@example.com\", " +
"\"bcc\": \"bcc_user@example.com\", " +
"\"content\": \"Dear partner. We are delighted to invite you to an exclusive training session on UX Design. This session is designed to provide essential insights and practical strategies to enhance your skills.\", " +
"\"html_content\": \"Dear partner,<br />We are delighted to invite you to an exclusive training session on <strong>UX Design</strong>. This session is designed to provide essential insights and practical strategies to enhance your skills.\" " +
"}";
DataOutputStream outputStream = new DataOutputStream(connection.getOutputStream());
outputStream.writeBytes(requestBody);
outputStream.flush();
outputStream.close();
// Get the response code
int responseCode = connection.getResponseCode();
// Read the response from the server
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String line;
StringBuilder response = new StringBuilder();
while ((line = reader.readLine()) != null) {
response.append(line);
}
reader.close();
// Print the response
System.out.println("Response Code: " + responseCode);
System.out.println("Response Body: " + response.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
}Invia email con il tuo linguaggio di programmazione preferito
Le nostre API offrono agli sviluppatori la flessibilità di integrare soluzioni email con i linguaggi di programmazione preferiti. Che tu sia esperto di Python, cURL, Ruby o qualsiasi altro linguaggio diffuso, il nostro supporto API completo ha tutto ciò di cui hai bisogno.
I punti di forza del servizio TurboSMTP
Ecco quattro validi motivi per scegliere il servizio TurboSMTP: recapito email senza eguali, analisi dei dati per decisioni informate, privacy e sicurezza robuste, e supporto dedicato 24/7 per un'esperienza email senza pensieri.
Infrastruttura potente per un'elevata deliverability
La nostra infrastruttura scala senza sforzo da poche email fino a diversi milioni, semplificando la distribuzione massiva grazie a soluzioni cloud che supportano sia l'integrazione SMTP che RESTful API. TurboSMTP garantisce inoltre una consegna rapida delle email, fondamentale per mantenere le comunicazioni tempestive e rafforzare il rapporto con il tuo pubblico.


Ottimizza le campagne con metriche e analytics
Gli strumenti di statistica e reportistica di TurboSMTP trasformano la tua strategia email con dati immediatamente utilizzabili. La nostra dashboard di analytics fornisce metriche in tempo reale su deliverability, aperture, clic e bounce, permettendoti di ottimizzare le campagne in modo efficace. Monitora il comportamento dei destinatari per affinare i messaggi, aumentare l'engagement e incrementare le conversioni. Con TurboSMTP, prendi decisioni basate sui dati per campagne mirate che generano un ROI migliore e rafforzano il legame con il tuo pubblico.
Privacy e sicurezza email: valori fondamentali
Il nostro servizio email è progettato tenendo al centro la tua privacy e sicurezza, integrando protocolli di crittografia avanzati per proteggere i tuoi dati. Il rigoroso rispetto delle normative sulla privacy è alla base del nostro servizio, garantendo che ogni email sia al riparo da accessi non autorizzati e che le tue comunicazioni restino sempre al sicuro.


Supporto sempre disponibile, quando ne hai bisogno
In TurboSMTP, offriamo un supporto 24/7 che va oltre la semplice assistenza: è un impegno condiviso. Il nostro team dedicato è sempre al tuo fianco, pronto a fornire una guida esperta e risoluzioni rapide. Con un impegno costante verso l'eccellenza, garantiamo un'esperienza email fluida e senza preoccupazioni. Conta su di noi per un supporto affidabile a ogni fase del processo di invio delle email.
Inizia con l'Email API di TurboSMTP
Segui questi tre semplici passaggi per integrare TurboSMTP nella tua applicazione.
Registrati gratuitamente e ottieni 10.000 email gratuite al mese.
Recupera la tua chiave API dalla dashboard.
Consulta la nostra documentazione API per avviare l'integrazione.








