SMTPProvider’s API Documentation | SMTPProvider.com
Hand Emojji Images Your Success, Our Priority: Our team is here to assist you!

Our Top Course
React Js
(15 Reviews)
$15 $25
Java Program
(15 Reviews)
$10 $40
Web Design
(15 Reviews)
$10 $20
Web Design
(15 Reviews)
$20 $40
API Send Mail Documentation

POST Send Email

URL: https://app.smtpprovider.com/api/send-mail/

Data Dictionary
Field Type Description Required
to string Email id of the user where you want to send email. Y
from string Email id of the sender. Y
from_name string Name of the sender. Y
subject string Subject you want to send with the email. Y
body string HTML template of the email. Y
token string Unique API Tokens provided in profile page. Y

PHP -cURL Example:

        $curl = curl_init();
        curl_setopt_array($curl, array(
        CURLOPT_URL => 'https://app.smtpprovider.com/api/send-mail?to=test@example.com&from=info@example.com&from_name=support&subject=test%mail&body=%3Cp%3Ehappy%20birthday%3C%2Fp%3E&token=*****************',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => '',
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 0,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_CUSTOMREQUEST => 'POST',
        ));

        $response = curl_exec($curl);

        curl_close($curl);
        echo $response;
    

Success Response:

    {
        "success": 1,
        "message_id": "mid-5739b9aa57df91a117476d030d38246c@akoneseo.com"
    }
    

Error Response:

      {
        "success": false,
        "data": {
            "message": "User Not Exist."
        }
       }
    

C#-HttpClient Example:

    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Post, "https://app.smtpprovider.com/api/send-mail?to=test@example.com&from=info@example.com&from_name=support&subject=test mail&body=

happy birthday

&token=*******************"); var content = new StringContent("", null, "text/plain"); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync());

C#-RestSharp Example:

    var options = new RestClientOptions("https://app.smtpprovider.com")
    {
    MaxTimeout = -1,
    };
    var client = new RestClient(options);
    var request = new RestRequest("/api/send-mail?to=test@example.com&from=info@example.com&from_name=support&subject=test mail&body=

happy birthday

&token=*******************", Method.Post); var body = @""; request.AddParameter("text/plain", body, ParameterType.RequestBody); RestResponse response = await client.ExecuteAsync(request); Console.WriteLine(response.Content);

cURL Example:

    curl --location --request POST 'https://app.smtpprovider.com/api/send-mail?to=test%40example.com&from=info%40example.com&from_name=support&subject=test%20mail&body=%3Cp%3Ehappy%20birthday%3C%2Fp%3E&token=*******************' \
--data ''
    

JAVA OkHttp:

    OkHttpClient client = new OkHttpClient().newBuilder().build();
    MediaType mediaType = MediaType.parse("text/plain");
    RequestBody body = RequestBody.create(mediaType, "");
    Request request = new Request.Builder()
    .url("https://app.smtpprovider.com/api/send-mail?to=test@example.com&from=info@example.com&from_name=support&subject=test mail&body=

happy birthday

&token=*******************") .method("POST", body) .build(); Response response = client.newCall(request).execute();

JAVA Unirest Example:

    Unirest.setTimeouts(0, 0);
    HttpResponse response = Unirest.post("https://app.smtpprovider.com/api/send-mail?to=test%40example.com&from=info%40example.com&from_name=support&subject=test%20mail&body=%3Cp%3Ehappy%20birthday%3C%2Fp%3E&token=*******************")
    .body("")
    .asString();

    

JavaScript Fetch Example:

    const raw = "";
    const requestOptions = {
    method: "POST",
    body: raw,
    redirect: "follow"
    };

    fetch("https://app.smtpprovider.com/api/send-mail?to=test@example.com&from=info@example.com&from_name=support&subject=test mail&body=

happy birthday

&token=*******************", requestOptions) .then((response) => response.text()) .then((result) => console.log(result)) .catch((error) => console.error(error));

JavaScript Jquery Example:

    var settings = {
    "url": "https://app.smtpprovider.com/api/send-mail?to=test@example.com&from=info@example.com&from_name=support&subject=test mail&body=

happy birthday

&token=*******************", "method": "POST", "timeout": 0, }; $.ajax(settings).done(function (response) { console.log(response); });

Paython -http.client Example:

    import http.client
    conn = http.client.HTTPSConnection("app.smtpprovider.com")
    payload = ''
    headers = {}
    conn.request("POST", "/api/send-mail?to=test@example.com&from=info@example.com&from_name=support&subject=test%20mail&body=%3Cp%3Ehappy%20birthday%3C/p%3E&token=*******************", payload, headers)
    res = conn.getresponse()
    data = res.read()
    print(data.decode("utf-8"))
    

Paython -Requests Example:

    import requests

    url = "https://app.smtpprovider.com/api/send-mail?to=test@example.com&from=info@example.com&from_name=support&subject=test mail&body=

happy birthday

&token=*******************" payload = "" headers = {} response = requests.request("POST", url, headers=headers, data=payload) print(response.text)

Swift -URLSession Example:

    var request = URLRequest(url: URL(string: "https://app.smtpprovider.com/api/send-mail?to=test%40example.com&from=info%40example.com&from_name=support&subject=test%20mail&body=%3Cp%3Ehappy%20birthday%3C%2Fp%3E&token=*******************")!,timeoutInterval: Double.infinity)
    request.httpMethod = "POST"

    let task = URLSession.shared.dataTask(with: request) { data, response, error in 
    guard let data = data else {
        print(String(describing: error))
        return
    }
    print(String(data: data, encoding: .utf8)!)
    }

    task.resume()