Professional Email API Service

Send emails through any SMTP provider with our powerful, flexible, and easy-to-use API. No authentication required - just provide your SMTP credentials and send!

API Status: Online Checking...

Why Choose EmailSender API?

Built for developers who need reliable, flexible email sending capabilities

No Authentication Required

Simply provide your SMTP credentials in each request. No API keys, no registration required.

Any SMTP Provider

Works with Gmail, Outlook, Yahoo, SendGrid, Mailgun, or any custom SMTP server.

Complete Tracking

Every email is logged with sender details, recipient info, and request metadata.

Developer Friendly

Simple REST API with JSON requests and responses. Full documentation and examples included.

Fast & Reliable

Built on Laravel framework for high performance and reliability. Error handling included.

Secure

TLS/SSL encryption support. Passwords are never stored - only used for SMTP authentication.

API Documentation

Everything you need to integrate email sending into your application

POST Send Email

Send an email using your SMTP configuration

Endpoint

POST /api/send-mail

Request Body

{
  "sender_name": "John Doe",
  "sender_email": "john@example.com",
  "sender_password": "app_password",
  "recipient_email": "recipient@example.com",
  "subject": "Test Email",
  "body": "<h1>Hello!</h1><p>This is a test email.</p>",
  "smtp_host": "smtp.gmail.com",
  "smtp_port": 587,
  "smtp_username": "john@example.com",
  "smtp_encryption": "tls"
}

Response

{
  "success": true,
  "message": "Email sent successfully",
  "data": {
    "id": 1,
    "sent_at": "2025-09-08T10:30:00.000000Z"
  }
}

GET Get Email History

Retrieve sent emails with optional filtering

Endpoint

GET /api/sent-mails

Query Parameters

Parameter Type Description
ip string Filter by IP address
status string Filter by status (sent/failed)
from_date date Filter from date (YYYY-MM-DD)
per_page integer Results per page (default: 15)

GET API Status

Check if the API service is running

Endpoint

GET /api/status

Common SMTP Configurations

Gmail

Host: smtp.gmail.com

Port: 587

Encryption: tls

* Use App Password instead of regular password

Outlook

Host: smtp-mail.outlook.com

Port: 587

Encryption: tls

Yahoo

Host: smtp.mail.yahoo.com

Port: 587

Encryption: tls

SendGrid

Host: smtp.sendgrid.net

Port: 587

Encryption: tls

* Username: "apikey"

Code Examples

Ready-to-use code snippets in popular programming languages

JavaScript (Fetch)

const response = await fetch('/api/send-mail', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    sender_name: 'John Doe',
    sender_email: 'john@example.com',
    sender_password: 'app_password',
    recipient_email: 'recipient@example.com',
    subject: 'Hello from API',
    body: '<h1>Hello!</h1>',
    smtp_host: 'smtp.gmail.com',
    smtp_port: 587,
    smtp_username: 'john@example.com',
    smtp_encryption: 'tls'
  })
});

const result = await response.json();
console.log(result);

Python (Requests)

import requests

data = {
    "sender_name": "John Doe",
    "sender_email": "john@example.com",
    "sender_password": "app_password",
    "recipient_email": "recipient@example.com",
    "subject": "Hello from API",
    "body": "<h1>Hello!</h1>",
    "smtp_host": "smtp.gmail.com",
    "smtp_port": 587,
    "smtp_username": "john@example.com",
    "smtp_encryption": "tls"
}

response = requests.post(
    'http://your-domain.com/api/send-mail',
    json=data
)

print(response.json())

PHP (cURL)

$data = [
    'sender_name' => 'John Doe',
    'sender_email' => 'john@example.com',
    'sender_password' => 'app_password',
    'recipient_email' => 'recipient@example.com',
    'subject' => 'Hello from API',
    'body' => '<h1>Hello!</h1>',
    'smtp_host' => 'smtp.gmail.com',
    'smtp_port' => 587,
    'smtp_username' => 'john@example.com',
    'smtp_encryption' => 'tls'
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://your-domain.com/api/send-mail');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
curl_close($ch);

echo $response;

cURL

curl -X POST http://your-domain.com/api/send-mail \
  -H "Content-Type: application/json" \
  -d '{
    "sender_name": "John Doe",
    "sender_email": "john@example.com",
    "sender_password": "app_password",
    "recipient_email": "recipient@example.com",
    "subject": "Hello from API",
    "body": "<h1>Hello!</h1>",
    "smtp_host": "smtp.gmail.com",
    "smtp_port": 587,
    "smtp_username": "john@example.com",
    "smtp_encryption": "tls"
  }'