ApiKey :
Your Api Key is: Your Api Key
POST : Email API Send Email

Request:

https://emailidea.biz/api/SendEmail


Parameters:

Field Description For Example Required
ApiKey Your API Key AbCdEfGhIjKlMnOpQrStUvWxYz123456
From From Address from@example.com
FromName Name who sending the email XYZ
ReplyTo Email Reply Address reply@example.com
To Recipient Email Address xyz@gmail.com
Subject Area of an email is a short description of the message XYZ
Body Email Content XYZ
SpamLinkRequired Spam Link Required True/False
UnsubscribeLinkRequired Un-Subscribe Link Required True/False
ScheduleTime Schedule Time 29-Dec-2010 11:45:52 AM
Attachments An array of supported attachments to add to the message. name:the file name of the attachment
content: the content of the attachment as a base64-encoded string
[{'Item1':'myfile1.txt','Item2':'ZXhhbXBsZSBmaWxl'},
{'Item1':'myfile2.txt','Item2':'ZXhhbXBsZSBmaWxl'}]
Cc Cc Address cc@example.com
Bcc Bcc Address bcc@example.com
A sample HTTP API Call would be:
https://emailidea.biz/api/sendEmail?key=your_api_key
&to=your_recipient1&message=your_msg&IsUrgent=value

For Example:

https://emailidea.biz/api/sendEmail?key=AbCdEfGhIjKlMnOpQrStUvWxYz123456&to=919812345678&message=Hello&IsUrgent=false


Calling HTTP API Using C#.Net

using System;
using RestSharp;
public void sendEmail() { var client = new RestClient("https://emailidea.biz/api/sendEmail"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/x-www-form-urlencoded"); request.AddParameter("ApiKey", "9safkjstjgorewtndfauregfd3b6a735ab"); request.AddParameter("From", "relay@eimails152fg.co.in"); request.AddParameter("FromName", "Xyz"); request.AddParameter("ReplyTo", "relay@eimails152fg.co.in"); request.AddParameter("To", "xyz@gmail.co.in"); request.AddParameter("Subject", "Xyz"); request.AddParameter("Body", "XYZ"); request.AddParameter("ScheduleTime", "29-Dec-2022 11:45:52 AM"); IRestResponse response = client.Execute(request); Console.WriteLine(response .Content); }

Calling HTTP API Using JavaScript - jQuery

var settings = {
 "url": "https://emailidea.biz/api/SendEmail",
  "method": "POST",
  "timeout": 0,
  "headers":{
    "Content-Type": "application/x-www-form-urlencoded"
  },
  "data": {
    "ApiKey": "9adshgfklesgdfhgk8f6d3b6a735ab",
    "From": "relay@eimailsdgfh.co.in",
    "FromName": "Xyz",
    "ReplyTo": "Xyz",
    "To": "Xyz@gmail.co.in",
    "Subject": "Xyz",
    "Body": "Xyz",
    "ScheduleTime": "29-Dec-2022 11:45:52 AM"
  }
};

$.ajax(settings).done(function (response) {
 Console.WriteLine(response);
});
                                                                                

Calling HTTP API Using php

<?php
                                                            
$curl = curl_init();
curl_setopt_array($curl, array(
     CURLOPT_URL => 'https://emailidea.biz/api/sendEmail',
     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',
     CURLOPT_POSTFIELDS =>
        'ApiKey=9aaaeawedfhe4rgrb6a735ab&
         From=relay%40eimailsshf.co.in&
         FromName=xyz%zz&
         ReplyTo=relay%40eimailssaf.co.in&
         To=xyz%40gmail.co.in&
         Subject=xyz&
         Body=xyz&
         ScheduleTime=29-Dec-2022%2011%3A45%3A52%20AM',
    CURLOPT_HTTPHEADER => array( 'Content-Type: application/x-www-form-urlencoded'),
));

$response = curl_exec($curl);
curl_close($curl);
echo $response;

?>

Calling HTTP API Using Java

import java.io.IOException;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;

public void sendEmail() {
    try {
        OkHttpClient client = new OkHttpClient().newBuilder().build();
        MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
        RequestBody body = RequestBody.create(mediaType,       
           "ApiKey=9aaaeadgsbr5155fdg6a735ab&
            From=relay@eimailsdgjsdf.co.in&
            FromName=Xyz&
            ReplyTo=relay@eimailssfdw4.co.in&
            To=Xyz@Gmail.co.in&
            Subject=Xyz &
            Body=Xyz&
            ScheduleTime=29-Dec-2022 11:45:52 AM"
         );
        Request request = new Request.Builder()
          .url(("https://emailidea.biz/api/sendEmail"))  
          .method("POST", body)
          .addHeader("Content-Type", "application/x-www-form-urlencoded")
          .build();
        Response response = client.newCall(request).execute();
    } 
    catch (Exception ex) {
      ex.printStackTrace();
    }
  }

Calling HTTP API Using Python

import http.client

conn = http.client.HTTPSConnection("https://emailidea.biz")
payload = 
    'ApiKey=9aaaedejthr4treb6a735ab&
     From=relay%40eimailsdfgg.co.in&
     FromName=Xyz%&
     ReplyTo=relay%40eimailssydfe.co.in&
     To=Xyz%40gmail.co.in&
     Subject=Xyz&
     Body=Xyz&
     ScheduleTime=29-Dec-2022%2011%3A45%3A52%20AM'
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
conn.request("POST", "/api/SendEmail", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
                                                                                
Sample Code Response:

By this api you can Post send Message for User send Message and also for existing information.

"{\"status\":\"success\",\"message\":\"Send Successfully\",\"data\":\"78874444438\"}"

API Error Responce :

  • "status": "error","message": "No Record Found","data":""
  • "status": "error","message": "Invalid file attachment.(You can send max 2MB file as a attachment)","data":""
  • "status": "error","message": "Invalid file attachment","data":""
  • "status": "error","message": "Invalid Parameters","data":""
  • "status": "error","message": "Could Not Send Email","data":""
  • "status": "error","message": "InSufficiant balance","data":""
  • "status": "error","message": "To field is required","data":""
Change your SMTP settings
 SMTP Server      : smtp.emailidea.biz
 Port             : 587
 UserName         : Your UserName
 Password         : Your Api Key
    
SMTP

Configuration example with C#:

using (SmtpClient smtpClient = new SmtpClient())
{
    smtpClient.Host = "smtp.emailidea.biz";
    smtpClient.Port = 587;
    smtpClient.UseDefaultCredentials = false;
    smtpClient.Credentials = new NetworkCredential("Your UserName","Your Api Key");
    smtpClient.EnableSsl = false;
    smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
    MailMessage mail = new MailMessage();
    mail.From = new MailAddress("Your UserName");
    mail.Sender = new MailAddress("Your UserName");
    mail.To.Add("Your UserName");
    mail.ReplyToList.Add(new MailAddress("Your UserName"));
    mail.Subject = "Test Mail";
    mail.Body = "This is for testing SMTP mail";
    mail.IsBodyHtml = true;
    smtpClient.Send(mail);
}

Configuration example with PHP:

$from = 'Your UserName'; //change this to your email address
$to = 'address_form_will_send_TO@example.com'; // change to address
$subject = 'Insert subject here'; // subject of mail
$body = "whatever you like"; //content of mail

$headers = array(
    'From' => $from,
    'To' => $to,
    'Subject' => $subject
);

$smtp = Mail::factory('smtp', array(
        'host' => smtp.emailidea.biz,
        'port' => '587',
        'auth' => true,
        'username' => Your UserName, //your gmail account
        'password' => Your Api Key // your password 
    ));

// Send the mail
$mail = $smtp->send($to, $headers, $body);
Note: Error Response Received after SMTP call

  • SMTP Response Code: "452" : SMTP Error Message: "Insufficient Storage"
  • SMTP Response Code: "452" : SMTP Error Message: "InSufficiant balance."
  • SMTP Response Code: "510" : SMTP Error Message: "To field is required."
  • SMTP Response Code: "535" : SMTP Error Message: "Invalid IpAddress Or Authentication"
  • SMTP Response Code: "535" : SMTP Error Message: "Error on sending mail"
  • SMTP Response Code: "535" : SMTP Error Message: "Invalid Authentication"