Skip to main content
Manage SMTP credentials for sending emails through AhaSend’s SMTP service. Before running the examples, log in with a full API key, use your verified sender domain, and replace YOUR_RESOURCE_ID with a resource UUID from your test account. Create any named template, recipient, attachment, or JSON files first. Shell examples use Bash; examples that read JSON with jq need jq installed. Sends use sandbox mode.

Overview

Available subcommands:
  • list - List all SMTP credentials
  • create - Create a new SMTP credential
  • get - Get details of a specific SMTP credential
  • delete - Delete an SMTP credential
  • send - Send an email via SMTP protocol
SMTP credentials allow you to send emails using standard SMTP protocol through any email client or application that supports SMTP. This is useful for integrating AhaSend with legacy systems, mail servers, or applications that only support SMTP. Use SMTP credentials to:
  • Send emails from email clients (Outlook, Thunderbird, etc.)
  • Integrate with applications that only support SMTP
  • Use AhaSend from programming languages without SDK support
  • Send transactional emails from servers that support STARTTLS and AUTH PLAIN

List SMTP Credentials

Create SMTP Credential

Get SMTP Details

Delete SMTP Credential

Send via SMTP

Send email using SMTP protocol for testing: Set SMTP_USERNAME and SMTP_PASSWORD in your shell from the values returned when you created the sandbox credential. The CLI cannot retrieve an existing credential’s password from its ID; pass both values explicitly.
Each SMTP credential provides:
  • Username and password for authentication
  • Scope (global or domain-specific)
  • Sandbox mode option for testing
  • Standard SMTP server configuration

Next Steps

Command Flags

These flags come from the current CLI. All commands also accept the global flags.

smtp create

smtp delete

smtp get

This command has no command-specific flags. See global flags.

smtp list

smtp send