# Mail Setup

This section will help you set up email functionality in The DAO Tool — used to send notifications like bounty assignments, password resets, and email validation.

![MAIL SETUP](/files/ELwmo5RCQoKvWcdxPFAk)

We’ll be using **Gmail's SMTP service** to send emails securely.

## Step 1: Enable 2-Step Verification (if not already)

![2FA](/files/hkA9BrDW2sQB4EPlWNbu)

First, make sure 2-Step Verification is enabled on your Google account.\
You can enable it here: [myaccount.google.com/security](https://myaccount.google.com/security)

## Step 2: Create an App Password

![APPLICATION PASSWORD](/files/3IJxYuXX3l5YgXsGf5qd)

1. Go to your [Google App Passwords](https://myaccount.google.com/apppasswords) page.
2. Please provide a valid name for your application.
3. Click **Create**.\
   Google will give you a **16-character app password** (looks like `abcd efgh ijkl mnop`).

## Step 3: Add to `.env` File

Now open your `/server/.env` file and add the following:

```env
SMTP_USER=your-gmail-address@gmail.com
SMTP_PASS=your-16-character-app-password
```

{% hint style="warning" %}
Make sure your Gmail is a trusted sender (ideally not your personal account) for better deliverability on production.
{% endhint %}

That’s it! Your emails will now be sent using your Gmail account via secure SMTP.


---

# Agent Instructions: 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:

```
GET https://docs.thedaotool.com/local-setup/mail-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
