# Send from Gmail with your own domain

> Send as support@yourdomain.com from Gmail ("Send mail as") through the Vaartix SMTP relay, with SPF, DKIM and DMARC passing.

Source: https://vaartix.com/docs/guides/gmail-send-as/

Gmail’s **Send mail as** lets you write from an address on your own domain, such as `support@acme.in`, without leaving Gmail. Gmail hands those messages to an SMTP server you choose. With the [Vaartix SMTP relay](https://vaartix.com/docs/sending/smtp/) 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

-   **The domain is verified in Vaartix.** The domain (or a subdomain of it) must show **Verified** under **Domains** ([how to verify](https://vaartix.com/docs/domains/verify/)). A subdomain address such as `support@mail.acme.in` is covered by `mail.acme.in` or by `acme.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](https://developers.cloudflare.com/email-routing/) to your Gmail.

## 1\. Create an API key for Gmail

Give each person or mailbox its own key, so you can revoke one without touching the others.

1.  In the dashboard, open **API keys** → **Create API key**.
2.  **Name**: something you’ll recognise later, for example `gmail-send-as-priya`.
3.  **Access**: **Sending only**.
4.  **Limit to domains**: tick only the domain of the address, for example `acme.in`.
5.  **Create**, then copy the key (`vx_live_...`). It’s shown only once.

## 2\. Add the address in Gmail

1.  In Gmail, go to **Settings** (the gear icon) → **See all settings** → **Accounts and Import** (**Accounts** in Google Workspace).

2.  Next to **Send mail as**, click **Add another email address**.

3.  Enter the **Name** recipients should see, for example `Acme Support`, and the **Email address**, for example `support@acme.in`.

4.  **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.
5.  Click **Next Step** and fill in the SMTP server:

    | Field | Value |
    | --- | --- |
    | SMTP Server | `smtp.vaartix.com` |
    | Port | `587` with **Secured connection using TLS** (recommended), or `465` with **Secured connection using SSL** |
    | Username | `vaartix` |
    | Password | The API key from step 1 |

6.  Click **Add Account**. Gmail logs in to the relay to check the settings, then emails a confirmation code to the address.

7.  Open that email (in the mailbox or forwarding target from [Before you start](https://vaartix.com/docs/guides/gmail-send-as/#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

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 `support@acme.in` go out from `support@acme.in`.

## 3\. Check that it works

1.  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).
2.  In Vaartix, open **Logs**. The message is there with method `SMTP` and status `250`, and the email is under **Emails**.
3.  Open the message where it arrived. In Gmail, use **⋮** → **Show original**. It should show `SPF: PASS`, `DKIM: PASS` with your domain, and `DMARC: PASS`.

## 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](https://vaartix.com/docs/sending/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](https://vaartix.com/docs/domains/verify/) |
| `550 … is on your suppression list` | That recipient bounced or complained before | See [Suppression](https://vaartix.com/docs/concepts/suppression/) |
| `550 Sending is paused for this account.`, or `535 This account is suspended.` | Your team’s sending is paused or suspended | Contact [support@vaartix.com](mailto:support@vaartix.com) |
| `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](https://vaartix.com/docs/concepts/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 |

Messages sent from Gmail count toward your team’s daily limit and your plan’s monthly emails, the same as API emails. Each recipient counts, so one message to 3 people is 3 emails.

## 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

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](https://vaartix.com/docs/guides/gmail-send-as/#1-create-an-api-key-for-gmail) |

-   **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.
