Send from Gmail with your own domain
Gmail’s Send mail as lets you write from an address on your own domain, such as
[email protected], without leaving Gmail. Gmail hands those messages to an SMTP server you choose.
With the Vaartix SMTP relay as that server, each message goes out from
your verified domain with SPF, DKIM and DMARC passing, and shows up in your Vaartix logs.
Before you start
Section titled “Before you start”- The domain is verified in Vaartix. The domain (or a subdomain of it) must show
Verified under Domains (how to verify). A subdomain address
such as
[email protected]is covered bymail.acme.inor byacme.in. - The address can receive mail. Gmail emails a confirmation code to the address before it lets you send from it. Vaartix only sends, so receiving needs something else: a mailbox at Google Workspace or Zoho Mail, or forwarding such as Cloudflare Email Routing to your Gmail.
1. Create an API key for Gmail
Section titled “1. Create an API key for Gmail”Give each person or mailbox its own key, so you can revoke one without touching the others.
- In the dashboard, open API keys → Create API key.
- Name: something you’ll recognise later, for example
gmail-send-as-priya. - Access: Sending only.
- Limit to domains: tick only the domain of the address, for example
acme.in. - Create, then copy the key (
vx_live_...). It’s shown only once.
2. Add the address in Gmail
Section titled “2. Add the address in Gmail”-
In Gmail, go to Settings (the gear icon) → See all settings → Accounts and Import (Accounts in Google Workspace).
-
Next to Send mail as, click Add another email address.
-
Enter the Name recipients should see, for example
Acme Support, and the Email address, for example[email protected]. -
Treat as an alias:
- Leave it ticked if the address is yours and its mail comes into this Gmail, for example through forwarding.
- Untick it if the address belongs to someone else or to a shared team mailbox. Gmail then treats the address as a separate person, for example when you write to it from this account.
-
Click Next Step and fill in the SMTP server:
Field Value SMTP Server smtp.vaartix.comPort 587with Secured connection using TLS (recommended), or465with Secured connection using SSLUsername vaartixPassword The API key from step 1 -
Click Add Account. Gmail logs in to the relay to check the settings, then emails a confirmation code to the address.
-
Open that email (in the mailbox or forwarding target from Before you start) and click the link, or enter the code in the Gmail window.
The address now appears in the From menu when you write a message.
Optional settings
Section titled “Optional settings”Both are under Settings → Accounts and Import → Send mail as:
- Make default, next to the address: new messages start with it as From.
- When replying to a message: choose Reply from the same address the message was sent to,
so replies to
[email protected]go out from[email protected].
3. Check that it works
Section titled “3. Check that it works”- Write a message with your new address as From and send it to an address you can read, ideally at another provider (Gmail and Outlook.com both work).
- In Vaartix, open Logs. The message is there with method
SMTPand status250, and the email is under Emails. - Open the message where it arrived. In Gmail, use ⋮ → Show original. It should show
SPF: PASS,DKIM: PASSwith your domain, andDMARC: PASS.
Troubleshooting
Section titled “Troubleshooting”When Vaartix refuses a message, Gmail sends you a delivery failure email with the relay’s reply in it: a code and a sentence saying what to fix. Each refused message also appears in Logs with its code. The full list is in SMTP errors.
| What you see | Why | What to do |
|---|---|---|
Gmail can’t add the account, or 535 Authentication failed. The username is vaartix and the password is an API key. |
Wrong username, or the key is mistyped, revoked or expired | Username exactly vaartix. Create a new key and paste it again |
454 Too many failed logins. Try again in … minutes. |
5 failed logins with the same key, or 10 from the same address, within 15 minutes | Fix the key, then wait the time shown (up to 30 minutes) |
550 This API key is not allowed to send from … |
The key is limited to other domains | Create a key limited to this domain (a key’s domains can’t be changed later), put it in Gmail, and revoke the old one |
550 Add … in Domains and publish its DNS records before sending from it. or 550 … is not verified yet. |
The From domain isn’t added or verified in this team | Verify the domain |
550 … is on your suppression list |
That recipient bounced or complained before | See Suppression |
550 Sending is paused for this account., or 535 This account is suspended. |
Your team’s sending is paused or suspended | Contact [email protected] |
554 subject: is required. |
The message has no subject | Add a subject. Gmail lets you send without one, Vaartix doesn’t |
552 The message is larger than 40 MB., or 554 attachments: the total must be under 30 MB. |
Too large | Share big files as links (Gmail offers Google Drive links) |
452 Too many recipients. |
More than 50 recipients (To, Cc and Bcc together) | Split the message, or use a mailing tool |
452 with a daily or monthly limit |
The team’s daily limit or the plan’s monthly emails are used up | Wait until midnight IST (daily) or the 1st (monthly), or see Limits |
421 Too many requests. |
More than 10 messages a second with this key, counting the API and SMTP together | A temporary error: Gmail tries again by itself, and only tells you if it gives up |
Security
Section titled “Security”- One key per person or mailbox, named after them, Sending only and limited to the one domain. Never reuse the key your production app sends with.
- When someone leaves, revoke their key under API keys, and remove the address from their Gmail if you can. Gmail can’t send as the address once the key is revoked.
- The Last used column under API keys shows when a key last sent. A key you don’t recognise, or one that is used when it shouldn’t be, can be revoked at once.
- Vaartix refuses to log in without TLS, so the key never crosses the network unencrypted.
Other email clients
Section titled “Other email clients”Outlook, Apple Mail and Thunderbird can send through Vaartix the same way. First add your mailbox account as usual, with its incoming server from your mail provider. Then set that account’s outgoing (SMTP) server:
| Setting | Value |
|---|---|
| Server | smtp.vaartix.com |
| Port and security | 587 with STARTTLS (sometimes labelled “TLS”), or 465 with SSL/TLS |
| Authentication | Password (normal password) |
| Username | vaartix |
| Password | An API key, one per person, as in step 1 |
- Outlook: Account settings → your account → Outgoing server / SMTP.
- Apple Mail: Settings → Accounts → your account → Server Settings → Outgoing Mail Account → Edit SMTP Server List. Untick Automatically manage connection settings to enter the port.
- Thunderbird: Account Settings → Outgoing Server (SMTP) → Add, then choose that server for your account.
The From address must be on a domain verified in Vaartix, and allowed for the key.