API Email pour les développeurs : boostez votre délivrabilité
L'API Email de TurboSMTP révolutionne votre workflow de développement, offrant une intégration ultra-rapide et une livraison instantanée des emails. Découvrez la simplicité d'intégration avec n'importe quelle application ou site web grâce à notre documentation API — l'envoi d'emails à grande échelle n'a jamais été aussi fluide.
API Email pour les développeurs, par les développeurs
L'API Email de TurboSMTP rend l'intégration des services email dans votre application extrêmement simple. Avec une API intuitive, une intégration sans friction et une documentation complète, vous pouvez rapidement faire évoluer l'envoi d'emails, que ce soit pour 2 messages ou 2 millions. Vous trouverez ci-dessous quelques exemples pratiques pour intégrer nos API avec les langages de programmation les plus utilisés.
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();
}
}
}Envoyez des emails avec votre langage de programmation préféré
Nos API offrent aux développeurs la flexibilité d'intégrer facilement des solutions email avec leurs langages de programmation préférés. Que vous maîtrisiez Python, cURL, Ruby ou tout autre langage populaire, notre support API complet répond à tous vos besoins.
Les points forts du service TurboSMTP
Voici quatre excellentes raisons de choisir TurboSMTP : une délivrabilité email sans égale, des analyses de données pour des décisions éclairées, une confidentialité et une sécurité robustes, et un support dédié 24/7 pour une expérience email sans souci.
Une infrastructure puissante pour une haute délivrabilité
Notre infrastructure s'adapte en toute fluidité de quelques emails à plusieurs millions, simplifiant la distribution massive grâce à des solutions cloud qui prennent en charge l'intégration SMTP et RESTful API. TurboSMTP garantit en outre une livraison rapide des emails, essentielle pour maintenir des communications ponctuelles et renforcer les liens avec votre audience.


Affinez vos campagnes avec les métriques et l'analytics
Les outils de statistiques et de reporting de TurboSMTP transforment votre stratégie email grâce à des données immédiatement exploitables. Notre tableau de bord analytics fournit des métriques en temps réel sur la délivrabilité, les ouvertures, les clics et les bounces, vous permettant d'optimiser vos campagnes efficacement. Suivez le comportement de vos destinataires pour affiner vos messages, améliorer l'engagement et augmenter les conversions. Avec TurboSMTP, prenez des décisions basées sur les données pour des campagnes ciblées qui génèrent un meilleur ROI et renforcent les liens avec votre audience.
Confidentialité et sécurité email : des valeurs fondamentales
Notre service email est conçu en plaçant votre confidentialité et votre sécurité au cœur de ses priorités, en intégrant des protocoles de chiffrement avancés pour protéger vos données. Le strict respect des réglementations sur la confidentialité est au cœur de notre service, garantissant que chaque email est protégé contre tout accès non autorisé et que vos échanges privés restent toujours en sécurité.


Un support toujours disponible, quand vous en avez besoin
Chez TurboSMTP, nous offrons un support 24/7 qui va au-delà du simple service : c'est un engagement partagé. Notre équipe dédiée est toujours à vos côtés, prête à fournir des conseils d'experts et des résolutions rapides. Avec un engagement constant envers l'excellence, nous garantissons une expérience email fluide et sans souci. Comptez sur nous pour un support fiable à chaque étape du processus d'envoi des emails.
Commencez avec l'API Email de TurboSMTP
Suivez ces trois étapes simples pour intégrer TurboSMTP dans votre application.
Inscrivez-vous gratuitement et obtenez 10 000 emails gratuits par mois.
Récupérez votre clé API depuis votre tableau de bord.
Consultez notre documentation API pour démarrer votre intégration.








