DocsOMailerSMTP Configuration
Infrastructure

SMTP Configuration

OMailerorravo.com/docs/omailer/smtp-configuration

SMTP Configuration

OMailer manages SMTP connections through OM_SMTP. Multiple named connections are supported — one is designated primary, one optional backup.

Supported Providers

ProviderHostPortEncryption
Gmail / Google Workspacesmtp.gmail.com587TLS
Microsoft 365 / Outlooksmtp.office365.com587TLS
Amazon SESregion-specific587TLS
Zoho Mailsmtp.zoho.com587TLS
Custom / GenericconfigurableconfigurableTLS or SSL

Gmail: Requires a Google App Password — standard account passwords are rejected. Enable 2FA first, then generate an App Password at myaccount.google.com.

Microsoft 365: SMTP AUTH must be enabled for the mailbox in Exchange Admin Center under Mail flow → Connectors.

Amazon SES: Use SMTP credentials (from IAM → SES SMTP Settings), not IAM access keys. Request production access to remove the sandbox sending limit.

Connection Data Structure

php[
  'name'       => 'My Gmail',
  'provider'   => 'gmail',    // gmail|microsoft365|ses|zoho|custom
  'host'       => 'smtp.gmail.com',
  'port'       => 587,
  'encryption' => 'tls',      // tls|ssl
  'auth'       => true,
  'username'   => 'you@gmail.com',
  'password'   => '',         // stored encrypted
  'from_name'  => 'Site Name',
  'from_email' => 'you@gmail.com',
]

PHP API

php$smtp = new OM_SMTP();

// Get all saved connections
$connections = $smtp->get_connections();

// Save a new connection
$smtp->save_connection( 'conn_id', $data );

// Set which connection is primary / backup
$primary_id = $smtp->get_primary_id();
$backup_id  = $smtp->get_backup_id();

// Send a test email
$result = $smtp->send_test( 'conn_id', 'recipient@example.com' );
// Returns: [ 'success' => bool, 'message' => string ]

// Encrypt / decrypt credentials
$encrypted = $smtp->encrypt_password( 'my-password' );
$plain     = $smtp->decrypt_password( $encrypted );

WordPress Options

OptionContains
om_smtp_connectionsArray of all connection configs (passwords encrypted)
om_smtp_routing[ 'primary' => 'conn_id', 'backup' => 'conn_id' ]
SMTP Configuration — OMailer Docs — Orravo