eSMS AfricaeSMS Africa
eSMS Mail

SMTP

Send emails using SMTP credentials instead of the REST API.

eSMS Mail provides SMTP relay access for sending emails from any application that supports SMTP — web frameworks, desktop clients, marketing tools, and more.

SMTP settings

SettingValue
Hostsend.esmsafrica.io
Port587
EncryptionSTARTTLS
UsernameGenerated (shown on creation)
PasswordGenerated (shown on creation)

Create SMTP credentials

Via dashboard

Go to Settings → SMTP Credentials and click Create. Select the domain to associate with the credential. The username and password are shown once — save them securely.

Via API

curl -X POST https://send.esmsafrica.io/v1/smtp-credentials/ \
  -H "Authorization: Bearer esms_k_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"domain_id": "your_domain_id"}'

Response:

{
  "id": "cred_123",
  "username": "abc123@yourdomain.com",
  "password": "generated_password",
  "smtp_host": "send.esmsafrica.io",
  "smtp_port": 587
}

The password is only shown once at creation time. If you lose it, delete the credential and create a new one.

Examples

Node.js (Nodemailer)

const nodemailer = require('nodemailer');

const transporter = nodemailer.createTransport({
  host: 'send.esmsafrica.io',
  port: 587,
  secure: false,
  auth: {
    user: 'your_smtp_username',
    pass: 'your_smtp_password',
  },
});

await transporter.sendMail({
  from: '"Your App" <hello@yourdomain.com>',
  to: 'user@example.com',
  subject: 'Hello from SMTP',
  html: '<p>Sent via SMTP relay!</p>',
});

Python (smtplib)

import smtplib
from email.mime.text import MIMEText

msg = MIMEText('<p>Sent via SMTP relay!</p>', 'html')
msg['Subject'] = 'Hello from SMTP'
msg['From'] = 'hello@yourdomain.com'
msg['To'] = 'user@example.com'

with smtplib.SMTP('send.esmsafrica.io', 587) as server:
    server.starttls()
    server.login('your_smtp_username', 'your_smtp_password')
    server.send_message(msg)

Django

# settings.py
EMAIL_HOST = 'send.esmsafrica.io'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = 'your_smtp_username'
EMAIL_HOST_PASSWORD = 'your_smtp_password'
DEFAULT_FROM_EMAIL = 'hello@yourdomain.com'

Laravel

MAIL_MAILER=smtp
MAIL_HOST=send.esmsafrica.io
MAIL_PORT=587
MAIL_USERNAME=your_smtp_username
MAIL_PASSWORD=your_smtp_password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=hello@yourdomain.com
MAIL_FROM_NAME="Your App"

SMTP vs API

FeatureSMTPREST API
Integration effortLow (standard protocol)Medium (HTTP client)
SpeedGoodBest
TrackingAutomaticAutomatic
Bulk sendingOne at a timeBatch via contact lists
WebhooksSupportedSupported

Both methods deliver emails through the same infrastructure with identical tracking and deliverability.

On this page