Transactional Email APIs and SMTP relays

Blazing fast emails at unbeatable prices.

Clear, fair and transparent pricing.
Top-notch support and onboarding.
No lock-in, No Hidden fees, No BS.

website banner
By Developers, For Developers

Transactional Email API

object
object
object
curl https://api.ahasend.com/v1/email/send
    -X POST
    -H 'Content-Type: application/json'
    -H 'X-Api-Key: YOUR-API-KEY'
    -d '{
        "from": {
            "name": "My awesome startup"
            "email": "[email protected]"
        },
        "recipients": [
            {
                "name": "Someone",
                "email": "[email protected]"
            }
        ],
        "content": {
            "subject": "Sample email",
            "text_body": "Plain text body",
            "html_body": "<p>This is the <b>HTML</b> body</p>",
        }
    }'

Install dependencies

$ npm i axios
const axios = require('axios');

const email = {
    from: {
        name: 'My awesome startup',
        email: '[email protected]',
    },
    recipients: [
        {
            name: 'Someone',
            email: '[email protected]',
        }
    ],
    content: {
        subject: 'Sample email',
        text_body: 'Plain text body',
        html_body: '<p>This is the <b>HTML</b> body</p>',
    },
};
axios.post('https://api.ahasend.com/v1/email/send', email, {
  headers: {
    'Content-Type': 'application/json',
    'X-Api-Key': 'YOUR-API-KEY',
  }
}).then((response) => {
    console.log(response);
});

Install dependencies

$ go get gopkg.in/gomail.v2
                                                email := gomail.NewMessage()
email.SetAddressHeader("From", "[email protected]", "My awesome startup")
email.SetAddressHeader("To", "[email protected]", "Someone")
email.SetHeader("Subject", "Sample email")
email.SetBody("text/plain", "Plain text body")
email.SetBody("text/html", "<p>This is the <b>HTML</b> body</p>")

// Port can be 25, 2525, or 587
d := gomail.NewDialer("send.ahasend.com", 587, "YOUR_SMTP_USERNAME", "YOUR_SMTP_PASSWORD")
if err := d.DialAndSend(msg); err != nil {
    log.Fatal(err)
}

Install dependencies

$ gem install httparty
require 'httparty'

class AhaSend
  include HTTParty

  base_uri 'https://send.ahasend.com'
  headers 'X-Api-Key' => ENV['AHASEND_API_KEY'], 'Content-Type' => 'application/json'

  def initialize(from_name:, from_email:)
    @from_name = from_name
    @from_email = from_email
  end

  def send_email(subject:, html_body:, recipient_email:, recipient_name: nil, text_body: nil)
    email = {
      from: { name: @from_name, email: @from_email },
      recipients: [{ name: recipient_name, email: recipient_email }],
      content: { subject:, html_body:, text_body: },
    }

    self.class.post('/v1/email/send', body: email)
  end
end

ahasend = AhaSend.new(from_name: 'My awesome startup', from_email: '[email protected]')
ahasend.send_email(
  subject: 'Sample email',
  html_body: '<p>This is the <b>HTML</b> body</p>',
  text_body: 'Plain text body',
  recipient_name: 'Someone',
  recipient_email: '[email protected]'
)

Install dependencies

$ python -m pip install requests
import requests
email = {
    'from': {
        'name': 'My awesome startup',
        'email': '[email protected]',
    },
    'recipients': [
        {
            'name': 'Someone',
            'email': '[email protected]',
        }
    ],
    'content': {
        'subject': 'Sample email',
        'text_body': 'Plain text body',
        'html_body': '<p>This is the <b>HTML</b> body</p>',
    },
}
headers = {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
}
r = requests.post('https://api.ahasend.com/v1/email/send', json=email, headers=headers)
print(r.json())
$email = [
    'from' => [
        'name' => 'My awesome startup',
        'email' => '[email protected]',
    ],
    'recipients' => [
        [
            name: 'Someone',
            email: '[email protected]',
        ]
    ],
    'content' => [
        'subject' => 'Sample email',
        'text_body' => 'Plain text body',
        'html_body' => '<p>This is the <b>HTML</b> body</p>',
    ],
];
$options = array(
  'http' => array(
    'header'  => "Content-type: application/json\r\nX-Api-Key: YOUR-API-KEY",
    'method'  => 'POST',
    'content' => json_encode($email)
  )
);
$context  = stream_context_create($options);
$resp = file_get_contents('https://api.ahasend.com/v1/email/send', FALSE, $context);
var_export($resp, TRUE);

Need help with another language? Contact us and we'll write it for you!

cover-fd
cover-bg
Independent

Real Email Provider

  • We're not another service provider on top of exisitng email APIs.

  • We own all our infrastructure and run our own SMTP servers.

  • This gives us the flexibility to choose our own customers and set our own pricing

cover-bg
cover-fd
Fairly priced

Simple and fair pricing

  • No tiered packages, you pay exactly for what you send.

  • Pay for emails sent, not for number of recipients.

cover-bg
cover-fd
Great support

Get help from real engineers

  • No automated replies, no clueless support agents. Always talk to a real engineer

  • Email us at [email protected] and get a reply from one of our engineers within a few hours

There's more

Everything you need, included.

More features, at no additional cost. We don't like hidden fees either :)

SMTP Relay

Send emails from any programming language or software using our SMTP relay servers.

Learn more
Email API

SMTP is good, but HTTP APIs are more flexible and faster for large senders.

Learn more
Tracking

Get insight on email engagement with message open and link click tracking.

Learn more
Message Retention Policies

Customize retention policies for your message data and metadata.

Learn more
Email Archiving

Archive your emails on any s3-compatible block storage service for compliance requirements.

Learn more
Free Dedicated IPs

Large senders sending over 300k emails per month get dedicated IPs - free of charge!

Learn more
AhaSend Dashboard Screenshot
icon

20,000,000+

Emails sent per month

icon

1.54 Seconds

Average delivery time to Gmail

icon

3,000,000+

Inboxes reached per month

Easy integration

Integrate with any language, framework or software

Start sending emails in minutes with our easy to use REST APIs and SMTP servers. We have ready to use code samples and SDKs for most languages and frameworks.

Don't see what you need? Contact us and we'll write it for you with our engineering-led support.

Python
Ruby
PHP
Ruby on Rails
Golang
Drupal
Nodejs
Lua
C++
Java
Dart
Commandline
WordPress
Kotlin
JavaScript
JavaScript
Kotlin
WordPress
Commandline
Dart
Java
C++
Lua
Nodejs
Drupal
Golang
Ruby on Rails
PHP
Ruby
Python
Kotlin
WordPress
Commandline
Dart
Java
C++
Lua
Nodejs
Drupal
JavaScript
Golang
Ruby on Rails
PHP
Ruby
Python

Fast Track Your Emails to the Inbox