# SMTP relay & framework integrations

> Connect existing applications, WordPress, Supabase, Laravel, Django, and Nodemailer to SadaSend via standard SMTP relay with zero code changes.

Already have working email dispatches in Nodemailer, Supabase Auth, WordPress, Laravel, or Django? Point your existing SMTP transport to SadaSend with zero code changes. You gain synchronous recipient validation, deliverability warmup protection, account-wide suppressions, and real-time event trails without rewriting your application logic.

## Connection parameters & credentials

SadaSend runs a high-throughput, low-latency SMTP relay listening on standard TLS and STARTTLS ports. Any API key minted on your account with the "send" scope functions as your SMTP password.

Connections authenticate via standard SASL PLAIN / LOGIN. Transport security is strictly enforced — plaintext authentication without TLS is rejected at the socket handshake.

```bash
# Standard SMTP Connection Parameters
Host:        smtp.sadasend.com
Port:        587 (STARTTLS) or 465 (SSL/TLS)
Username:    apikey
Password:    sada_live_sk_... (Your SadaSend API key)
Auth Method: PLAIN / LOGIN
```

## Environment variables (.env configuration)

Drop these standard variables directly into your framework, Docker container, or cloud deployment (.env):

```env
SMTP_HOST=smtp.sadasend.com
SMTP_PORT=587
SMTP_SECURE=false
SMTP_USER=sadasend
SMTP_PASS=sada_live_sk_your_api_key_here
MAIL_FROM=notifications@yourdomain.com
```

## Supabase Auth custom SMTP setup

Supabase Cloud free projects share a global SMTP pool throttled to 2 confirmation emails per hour. Connecting SadaSend custom SMTP completely removes this rate limit in under 3 minutes:

1. Log into your Supabase Dashboard and open your project.

2. Navigate to Project Settings → Authentication → SMTP Settings.

3. Toggle Enable Custom SMTP to ON.

4. Configure parameters: Sender email (e.g. noreply@yourdomain.com), Sender name (Your App), Host (smtp.sadasend.com), Port (587), Username (apikey), Password (your SadaSend API key).

5. Click Save. All signup confirmations, password resets, and magic links will dispatch immediately through your verified SadaSend sending domain.

## WordPress & WooCommerce integration

By default, WordPress attempts to use PHP mail(), which mailbox providers almost universally send to spam. You can connect SadaSend in 2 minutes using any standard SMTP plugin (WP Mail SMTP, FluentSMTP, or Post SMTP):

• Mailer / SMTP Provider: Choose "Other SMTP".

• SMTP Host: smtp.sadasend.com

• Encryption: TLS (or STARTTLS).

• SMTP Port: 587.

• Authentication: On / True.

• SMTP Username: apikey

• SMTP Password: Paste your SadaSend API key (sada_live_sk_...).

## Node.js (Nodemailer) recipe

If your Node.js or Express backend already uses Nodemailer, simply instantiate the transporter with SadaSend credentials:

```javascript
import nodemailer from 'nodemailer';

const transporter = nodemailer.createTransport({
  host: 'smtp.sadasend.com',
  port: 587,
  secure: false, // true for 465, false for 587 (STARTTLS)
  auth: {
    user: 'sadasend',
    pass: process.env.SADASEND_API_KEY,
  },
});

await transporter.sendMail({
  from: '"Acme App" <notifications@yourdomain.com>',
  to: 'user@example.com',
  subject: 'Order Confirmation #1042',
  html: '<p>Thank you for your order!</p>',
  text: 'Thank you for your order!',
});
```

## Python (smtplib standard library) recipe

Python includes full SMTP and STARTTLS support in its standard library with zero external dependencies:

```python
import smtplib
from email.message import EmailMessage
import os

msg = EmailMessage()
msg['Subject'] = 'Account Verification'
msg['From'] = 'security@yourdomain.com'
msg['To'] = 'user@example.com'
msg.set_content('Your verification code is: 849201')

with smtplib.SMTP('smtp.sadasend.com', 587) as server:
    server.starttls()
    server.login('sadasend', os.environ['SADASEND_API_KEY'])
    server.send_message(msg)
    print("Email dispatched via SadaSend SMTP!")
```

## Full guardrail & security parity

Unlike legacy providers where SMTP is an unmonitored back door, every message accepted via SadaSend SMTP relay is evaluated against the same security pipeline as the REST API and MCP server:

• Recipient allowlists: If your key has an allowlist, SMTP sends outside the allowlist are rejected during the RCPT TO handshake with SMTP code 550.

• Account suppressions: Hard bounces and spam complaints are automatically intercepted before reaching external mail servers.

• Approval mode: Keys configured in approval mode hold SMTP messages in your dashboard queue for human verification before wire dispatch.

• Event stream: SMTP dispatches appear in your dashboard logs with channel: "smtp" and full delivery timelines.
