> For the complete documentation index, see [llms.txt](https://docs.yeymail.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yeymail.com/using-yeymail/sending-and-replying/gmail.md).

# Gmail

Gmail can send from your alias while you keep working in your normal inbox. Sent mail comes from the alias, and replies come back to it.

Do this on a computer. The Gmail mobile apps don't have these settings, but once it's set up on the web it works in the mobile apps too.

## Before you start

In YeyMail: **Aliases → open the alias → Send as this alias (SMTP)** and set a password. Keep it to hand.

## Steps

1. In Gmail, click the gear icon → **See all settings**.
2. Open the **Accounts and Import** tab.
3. Next to *Send mail as*, click **Add another email address**.
4. Enter the name you want recipients to see and the full alias, e.g. `shop@yourdomain.com`.
5. Leave **Treat as an alias** ticked. Click **Next Step**.
6. Fill in the SMTP server:

   | Field       | Value                            |
   | ----------- | -------------------------------- |
   | SMTP Server | `mx1.yeymail.com`                |
   | Port        | `587`                            |
   | Username    | the full alias                   |
   | Password    | the SMTP password you set        |
   | Connection  | **Secured connection using TLS** |
7. Click **Add Account**.
8. Gmail sends a confirmation code to the alias. Because the alias forwards to you, that email arrives in this same inbox within a few seconds. Enter the code.

Done. When composing, click the **From** field and pick the alias.

## Choosing it automatically

Still under *Send mail as*, set **When replying to a message: Reply from the same address the message was sent to**. Gmail then answers mail that arrived on an alias using that alias, without you having to remember.

To make a specific alias your default for new messages, click **make default** next to it.

## If it doesn't work

**"Couldn't reach server"**: check the port is `587` and you picked **TLS**, not SSL. Gmail offers port 465 with SSL; we don't run that, and it will fail here.

**"Authentication failed"**: the username must be the full alias including the domain, and the password is the per-alias SMTP password from the dashboard, not your YeyMail account password.

**The confirmation code never arrives**: check the alias is switched on and forwarding to the inbox you're currently reading. You can confirm in the dashboard's activity log.

**Mail is rejected when sending**: make sure the From address is the same alias you're authenticating as. Gmail sends as whichever address you picked in the From field, and it has to match the credentials for that identity.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.yeymail.com/using-yeymail/sending-and-replying/gmail.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
