SMTP
If your app can only send email over SMTP, point it at Vaartix’s SMTP relay. Each message becomes
the same email as a POST /emails request: your verified domain, daily
limit, suppression list, webhooks and logs all work the same way.
Settings
Section titled “Settings”| Setting | Value |
|---|---|
| Host | smtp.vaartix.com |
| Port | 465 (SSL/TLS) or 587 (STARTTLS) |
| Encryption | Required. 465: SSL/TLS. 587: STARTTLS (sometimes labelled “TLS”) |
| Username | vaartix |
| Password | An API key, such as vx_live_... |
| Authentication | Required (PLAIN or LOGIN) |
Use a send-only key, made for this app, so you can revoke it on its own. The From address
must be on a domain your team has verified, or at test.vaartix.com to
test.
To send as [email protected] from Gmail (Send mail as), Outlook, Apple Mail or
Thunderbird, follow Send from Gmail with your own domain.
Examples
Section titled “Examples”The Vaartix plugin is the simplest way to send from WordPress. If you prefer SMTP, or can’t install plugins from a zip, install WP Mail SMTP and go to WP Mail SMTP → Settings:
- From Email: an address on your verified domain, for example
[email protected]. Tick Force From Email so plugins can’t send from other addresses. - From Name: your site or company name.
- Mailer: Other SMTP.
- SMTP Host
smtp.vaartix.com, Encryption SSL, SMTP Port465. (Or TLS with port587.) - Auto TLS: on. Authentication: on.
- SMTP Username
vaartix, SMTP Password your API key. - Save Settings, then send a test from the Tools → Email Test tab.
To keep the key out of the database, put it in wp-config.php instead:
define( 'WPMS_ON', true );define( 'WPMS_MAILER', 'smtp' );define( 'WPMS_SMTP_HOST', 'smtp.vaartix.com' );define( 'WPMS_SMTP_PORT', 465 );define( 'WPMS_SSL', 'ssl' );define( 'WPMS_SMTP_AUTH', true );define( 'WPMS_SMTP_USER', 'vaartix' );define( 'WPMS_SMTP_PASS', 'vx_live_...' );In .env:
MAIL_MAILER=smtpMAIL_SCHEME=smtpsMAIL_HOST=smtp.vaartix.comMAIL_PORT=465MAIL_USERNAME=vaartixMAIL_PASSWORD=vx_live_...MAIL_FROM_ADDRESS[email protected]MAIL_FROM_NAME="${APP_NAME}"On Laravel 10 and older, use MAIL_ENCRYPTION=ssl instead of MAIL_SCHEME. On Laravel 12 and
newer you can also use the Vaartix mail driver, which calls the API and
supports tags directly.
In settings.py:
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"EMAIL_HOST = "smtp.vaartix.com"EMAIL_PORT = 465EMAIL_USE_SSL = TrueEMAIL_HOST_USER = "vaartix"EMAIL_HOST_PASSWORD = os.environ["VAARTIX_API_KEY"]For port 587, set EMAIL_USE_TLS = True instead of EMAIL_USE_SSL. There is also a
Django backend that calls the API instead of SMTP.
import nodemailer from 'nodemailer';
const transporter = nodemailer.createTransport({ host: 'smtp.vaartix.com', port: 465, secure: true, // for port 587: secure: false, requireTLS: true auth: { user: 'vaartix', pass: process.env.VAARTIX_API_KEY },});
const info = await transporter.sendMail({ subject: 'Your order is confirmed', html: '<p>Thanks for your order!</p>', headers: { 'X-Vaartix-Tags': 'type=order' },});console.log(info.response); // 250 2.0.0 Queued as em_...For new Node.js code, the Node.js SDK is simpler and returns typed errors.
How messages are read
Section titled “How messages are read”| In the message | Becomes |
|---|---|
From header |
from. Its domain must be verified for your team. |
To and Cc headers |
to and cc |
Envelope recipients (RCPT TO) not in To or Cc |
bcc. This is how SMTP clients send blind copies. |
Reply-To, Subject |
replyTo, subject |
| HTML and plain-text parts | html and text |
| Attachments | attachments. Inline images keep their Content-ID, so cid: links in the HTML still work. |
X-Vaartix-Tags: type=order, plan=pro |
tags: [{"name":"type","value":"order"},{"name":"plan","value":"pro"}]. The header itself isn’t sent. |
Other headers, such as List-Unsubscribe or X-Campaign |
headers, sent as they are |
Headers Vaartix sets itself (Message-ID, Date, Return-Path, DKIM-Signature and the like) are
replaced. The envelope sender (MAIL FROM) is ignored: bounces always go to Vaartix, so it can
update the email’s status and your suppression list.
The return path is your domain’s vxmail. subdomain, such as vxmail.acme.in (or
vx-bounces.acme.in on older domains), the same as for the API. Gmail shows it as mailed-by
under “Show details”; recipients see your From address and Signed by your domain. See
The return path.
A message needs at least one address in To or Cc. Messages of up to 40 MB are accepted,
with at most 50 recipients and 30 MB of attachments, the same as the API.
When Vaartix accepts a message, it replies 250 2.0.0 Queued as em_.... That email ID is in the
dashboard’s Emails page and in webhook events. Each message also appears in Logs with the
method SMTP and the reply code.
Errors
Section titled “Errors”Vaartix answers with standard SMTP codes, so your app or plugin knows whether to try again.
4xx codes are temporary: well-behaved clients retry later. 5xx codes are permanent: fix the
cause before sending again.
| Code | Meaning | What to do |
|---|---|---|
535 |
Wrong username or API key, or the key was revoked | Username vaartix, password a current API key |
538 |
Login attempted before STARTTLS | Turn on TLS (port 587) or SSL (port 465) |
454 |
Too many failed logins: locked for 30 minutes | Fix the password, then wait |
550 |
The From domain isn’t verified (domain_not_verified), the recipient is suppressed, the key is limited to another domain, or sending is paused |
Read the message after the code |
554 |
The message is invalid, for example no subject or a blocked attachment type | Read the message after the code |
552 |
Larger than 40 MB | Send smaller attachments, or links to them |
452 |
Daily or monthly limit reached, or more than 50 recipients | Try again after midnight IST, or upgrade |
421 |
More than 10 messages a second for this key (one budget with the API), or more than 3 messages being sent at once from your address | Slow down, or send from fewer connections at once; the client reconnects and retries |
451 |
Something went wrong on our side | Retry; your client does this by itself |