> ## Content Index
> Fetch the complete content index at: https://catalins.tech/llms.txt
> Use this file to discover other available public pages before exploring further.

# Configure Ghost Mail with Gmail SMTP Server
- URL: https://catalins.tech/ghost-mail-smtp-configuration/
- Published: 2023-02-22T13:03:42.000Z
- Updated: 2024-11-23T10:38:44.000Z
- Author: Catalin Pit
- Tags: Ghost

Sending transactional emails from a self-hosted Ghost instance requires you to configure the mail manually. Transactional emails refer to emails containing password resets, member invitations, signup and login links.

If you have a Gmail account, you can use the Gmail SMTP server for free to send up to 500 emails per day *(at the time of writing this article)*. That's more than enough for most Ghost publications.

## Setup an app password in Gmail

You need to generate an "app password" to use the free Gmail SMTP server. Navigate to the "[App Passwords](https://myaccount.google.com/apppasswords)" page and follow these steps:

- enter your password
- select "Other (Custom name)"
- enter a name for your app
- press the button "GENERATE"

![The "App Passwords" page in Gmail](https://catalins.tech/content/images/2023/02/download.png)

## Configure Ghost to use the Gmail SMTP server

Once you have the password, navigate to the folder where your Ghost instance lives and open the `config.production.json` file. Next, add the following piece of code:

```
"mail": {
    "transport": "SMTP",
    "options": {
      "service": "Google",
      "host": "smtp.gmail.com",
      "port": 587,
      "auth": {
        "user": "<your-email>",
        "pass": "<your-password>"
      }
    }
  },

```

Don't forget to replace the "user" and "pass" fields with your information. After that, save the file and restart your Ghost instance for the changes to take effect. Use the command `ghost restart` to restart it.

## Ghost folder on DigitalOcean

If you are hosting your Ghost publication on DigitalOcean, you can find the `config.production.json` file in the `/var/www/ghost` folder.

## Bulk vs transactional emails

It's important to mention that you need different settings and a dedicated email service to send bulk emails. Bulk emails allow you to send newsletter issues to the publication members.

> If you want to host your Ghost publication on DigitalOcean, this article will help you [get started with Ghost on DigitalOcean droplet](https://catalins.tech/ghost-on-digitalocean-droplet/).