Skip to main content
While the REST API is recommended for modern applications, Ark supports standard SMTP for tools and frameworks that require it. Change one configuration and start sending through Ark instantly.
When to use SMTP: Self-hosted applications (Listmonk, Coolify, Metabase), legacy systems, or any software with built-in SMTP support but no HTTP API options.

Connection Details

Quick Reference

SettingValue
Hostmail.arkhq.io
Port587 (STARTTLS)
UsernameYour credential (e.g., acme/production)
PasswordYour credential key
EncryptionSTARTTLS required

Alternative Port

SettingValue
Hostmail.arkhq.io
Port465 (Implicit TLS)
UsernameYour credential (e.g., acme/production)
PasswordYour credential key
EncryptionTLS from start

Get Your Credentials

1

Open the Credentials Page

Go to arkhq.io/org/credentials in your dashboard.
2

Create or Select a Credential

Each credential has a username (like acme/production) and a key (your password).
3

Copy the Values

Use the username as your SMTP username and the key as your SMTP password.
Never share your credential key. It provides full sending access to your account. Rotate keys immediately if compromised.

Port Selection

PortEncryptionBest For
587STARTTLSMost applications. Connection upgrades to TLS after EHLO.
465Implicit TLSOlder apps that don’t support STARTTLS. Encrypted from the start.
Which should I use? Start with port 587. Only use 465 if your application doesn’t support STARTTLS or you encounter connection issues.
Edit your config.toml:
[smtp]
host = "mail.arkhq.io"
port = 587
auth_protocol = "login"
username = "your-org/production"
password = "your-credential-key"
tls_type = "STARTTLS"
max_conns = 10
Or via environment variables:
LISTMONK_smtp__host=mail.arkhq.io
LISTMONK_smtp__port=587
LISTMONK_smtp__auth_protocol=login
LISTMONK_smtp__username=your-org/production
LISTMONK_smtp__password=your-credential-key
LISTMONK_smtp__tls_type=STARTTLS
In Settings → Transactional Email:
FieldValue
SMTP EnabledYes
SMTP Hostmail.arkhq.io
SMTP Port587
SMTP Usernameyour-org/production
SMTP Passwordyour-credential-key
EncryptionTLS
From Address[email protected]
In Admin → Email:
FieldValue
SMTP Hostmail.arkhq.io
SMTP Port587
SMTP SecurityTLS
SMTP Usernameyour-org/production
SMTP Passwordyour-credential-key
From Address[email protected]
In grafana.ini or via environment:
[smtp]
enabled = true
host = mail.arkhq.io:587
user = your-org/production
password = your-credential-key
from_address = [email protected]
starttls_policy = MandatoryStartTLS
In /etc/gitlab/gitlab.rb:
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "mail.arkhq.io"
gitlab_rails['smtp_port'] = 587
gitlab_rails['smtp_user_name'] = "your-org/production"
gitlab_rails['smtp_password'] = "your-credential-key"
gitlab_rails['smtp_domain'] = "yourdomain.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
Then run gitlab-ctl reconfigure.
Using WP Mail SMTP plugin:
SettingValue
MailerOther SMTP
SMTP Hostmail.arkhq.io
EncryptionTLS
SMTP Port587
AuthenticationOn
Usernameyour-org/production
Passwordyour-credential-key
In your config.production.json:
{
  "mail": {
    "transport": "SMTP",
    "options": {
      "host": "mail.arkhq.io",
      "port": 587,
      "secure": false,
      "auth": {
        "user": "your-org/production",
        "pass": "your-credential-key"
      }
    }
  }
}
In Settings → SMTP:
FieldValue
SMTP Hostmail.arkhq.io
SMTP Port587
SMTP Useryour-org/production
SMTP Passwordyour-credential-key
SMTP SSLfalse
SMTP Sender[email protected]

Framework Integration

Using Nodemailer:
import nodemailer from 'nodemailer';

const transporter = nodemailer.createTransport({
  host: 'mail.arkhq.io',
  port: 587,
  secure: false, // true for 465, false for 587
  auth: {
    user: process.env.SMTP_USERNAME,
    pass: process.env.SMTP_PASSWORD,
  },
});

await transporter.sendMail({
  from: '"Your App" <[email protected]>',
  to: '[email protected]',
  subject: 'Welcome!',
  text: 'Thanks for signing up.',
  html: '<p>Thanks for signing up.</p>',
});

Web Framework Configuration

# config/environments/production.rb
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
  address: "mail.arkhq.io",
  port: 587,
  user_name: ENV["SMTP_USERNAME"],
  password: ENV["SMTP_PASSWORD"],
  authentication: :plain,
  enable_starttls_auto: true
}

Environment Variables

For most deployments, set these environment variables:
SMTP_HOST=mail.arkhq.io
SMTP_PORT=587
SMTP_USERNAME=your-org/production
SMTP_PASSWORD=your-credential-key
SMTP_FROM=[email protected]
Environment variable names vary by application. Check your app’s documentation for the exact names.

Testing Your Connection

Quick Test with swaks

swaks --to [email protected] \
  --from [email protected] \
  --server mail.arkhq.io:587 \
  --auth LOGIN \
  --auth-user "your-org/production" \
  --auth-password "your-credential-key" \
  --tls \
  --header "Subject: SMTP Test" \
  --body "If you see this, SMTP is working!"

Test TLS Connection

openssl s_client -connect mail.arkhq.io:587 -starttls smtp
You should see certificate information and 250 responses from the server.
Success! If you receive the test email, your SMTP configuration is working correctly.

SMTP vs REST API

FeatureSMTPREST API
Best forSelf-hosted apps, legacy systemsModern applications
SetupConfiguration changeSDK or HTTP client
TrackingAutomatic via ArkExplicit parameters
Batch sendingSequentialUp to 100 per request
Metadata/TagsVia headers (X-Postal-Tag)Native parameters
AttachmentsStandard MIMEBase64 in JSON
Same features, different interface. Emails sent via SMTP appear in the same dashboard, trigger the same webhooks, and use the same tracking as REST API emails. The only difference is how you send them.

Adding Tags and Metadata via SMTP

Use custom headers to add tags to your SMTP emails:
X-Postal-Tag: welcome-email
These tags appear in your dashboard and webhook events, just like REST API tags.

Troubleshooting

Causes:
  • Firewall blocking outbound port 587/465
  • Cloud provider restricting SMTP (common on AWS, GCP, Azure)
Solutions:
  • Check firewall rules allow outbound 587/465
  • For AWS: Request SMTP sending limits removal
  • For GCP: Use port 587, not 25
  • Try port 465 if 587 is blocked
Causes:
  • Wrong username format
  • Incorrect password
  • Suspended credential
Solutions:
  • Username format is org-name/credential-name (check dashboard)
  • Use the credential key, not the credential ID
  • Verify credential is active in dashboard
Causes:
  • Outdated CA certificates on your system
  • Application doesn’t support modern TLS
Solutions:
  • Update system CA certificates
  • Try port 465 (implicit TLS) instead of 587 (STARTTLS)
  • Check your app supports TLS 1.2+
Causes:
  • Network latency
  • DNS resolution issues
  • SMTP traffic inspection/filtering
Solutions:
  • Increase client timeout settings
  • Verify DNS resolves mail.arkhq.io correctly
  • Check for corporate proxies or firewalls inspecting SMTP
Causes:
  • Domain not verified
  • Recipient on suppression list
  • Email marked as spam
Solutions:
  • Verify your sending domain in the dashboard
  • Check suppressions
  • Review email content for spam triggers
  • Check recipient’s spam folder

Next Steps