Developer SMTP API Documentation

Welcome to the SMTP.MOM integration manual. Connect your client applications, billing software, custom backends, or email clients seamlessly via our global offshore mail pool.

SMTP Connection Parameters

To connect your software, point it to the global endpoint and use your dynamic credentials. Ensure your firewall allows outgoing traffic on your chosen port.

ParameterValueDescription
SMTP Hostapi.smtp.momUnified offshore relay endpoint
SMTP Usernamemom_xxxxxxxxxxGenerated randomly upon registration
SMTP Passwordyour_secure_api_keyGenerated API key accessible in Dashboard
EncryptionSTARTTLS / SSLExplicit security protocols highly recommended

Offshore Relay Ports

We host multiple communication ports to maximize compatibility across blocked networks and local ISP constraints:

PortProtocolUse Case / Description
2525STARTTLS / PlainDefault fallback port. Bypasses domestic ISP filters that block port 25. High speed.
587STARTTLSStandard SMTP client connection port. Supported by default in WHMCS and WordPress.
465SSL / SMTPSImplicitly encrypted connection port. Secure handshake immediately on connect.
25STARTTLS / PlainStandard mail transfer protocol port. Useful if outbound firewall restriction is absent.

SMTP Authentication

All relays require explicit authentication using standard SMTP Auth (PLAIN or LOGIN). Outbound mail is billed to your balance per-message based on your pricing tier rates.

Credential Shielding: To maximize account security and block outbound harvesting, SMTP.MOM generates isolated usernames (e.g. mom_f023a1) instead of using your personal account email. Keep your API keys confidential.

Code Integration Examples

Use these complete code blocks to drop SMTP relay capabilities directly into your projects.

PHPMailer (PHP)

use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; require 'vendor/autoload.php'; $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->Host = 'api.smtp.mom'; $mail->SMTPAuth = true; $mail->Username = 'YOUR_MOM_SMTP_USER'; // e.g. mom_a1b2c3d4e5 $mail->Password = 'YOUR_MOM_SMTP_KEY'; // your dynamic API password key $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; $mail->Port = 2525; // Or 587, 465 $mail->setFrom('[email protected]', 'Mailer'); $mail->addAddress('[email protected]'); $mail->Subject = 'Test Email via SMTP.MOM'; $mail->Body = 'High speed email delivery connection verified!'; $mail->send(); echo 'Message has been sent'; } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; }

WordPress Config (phpmailer_init)

Paste this code snippet at the end of your WordPress theme's active functions.php file to hook global outbound emails through SMTP.MOM:

add_action('phpmailer_init', 'smtp_mom_wp_config'); function smtp_mom_wp_config($phpmailer) { $phpmailer->isSMTP(); $phpmailer->Host = 'api.smtp.mom'; $phpmailer->SMTPAuth = true; $phpmailer->Port = 2525; // Or 587, 465 $phpmailer->Username = 'YOUR_MOM_SMTP_USER'; $phpmailer->Password = 'YOUR_MOM_SMTP_KEY'; $phpmailer->SMTPSecure = 'tls'; // Use 'ssl' for port 465 }

Nodemailer (Node.js)

const nodemailer = require('nodemailer'); const transporter = nodemailer.createTransport({ host: 'api.smtp.mom', port: 2525, // Or 587 secure: false, // true for port 465, false for others auth: { user: 'YOUR_MOM_SMTP_USER', pass: 'YOUR_MOM_SMTP_KEY' } }); transporter.sendMail({ from: '"SMTP.MOM Mailer" <[email protected]>', to: '[email protected]', subject: 'Test Email via SMTP.MOM', text: 'High speed email delivery connection verified!' }, (error, info) => { if (error) { return console.log(error); } console.log('Message sent: %s', info.messageId); });

smtplib (Python)

import smtplib from email.mime.text import MIMEText msg = MIMEText('High speed email delivery connection verified!') msg['Subject'] = 'Test Email via SMTP.MOM' msg['From'] = '[email protected]' msg['To'] = '[email protected]' try: with smtplib.SMTP('api.smtp.mom', 2525) as server: server.starttls() server.login('YOUR_MOM_SMTP_USER', 'YOUR_MOM_SMTP_KEY') server.send_message(msg) print("Email sent successfully!") except Exception as e: print(f"Error: {e}")

SMTP swaks Diagnostics

You can perform end-to-end connection testing directly from your server command line using the swaks utility:

swaks --server api.smtp.mom \ --port 2525 \ --auth-user YOUR_MOM_SMTP_USER \ --auth-password YOUR_MOM_SMTP_KEY \ --to [email protected] \ --from [email protected] \ --header "Subject: SMTP.MOM Testing" \ --body "Test connection handshakes" \ --tls-required

Troubleshooting Errors

If your message bounces or delivery fails, cross-reference these common SMTP error responses returned by our servers:

Error ResponseCauseResolution
535 Authentication failedInvalid SMTP username or API keyCheck your SMTP user & password details inside the credentials panel.
554 Insufficient balanceYour account balance is too low to relay the messageTop up your balance in the Billing or Deposit tab.
421 Relaying temporarily deniedOutbound nodes are temporarily throttlingThe proxy will automatically redirect to a backup node. Retry in a few seconds.