# Unable to invite new admin users to account without mailgun setup?

**URL:** <https://forum.ghost.org/t/unable-to-invite-new-admin-users-to-account-without-mailgun-setup/56711>\
**Category:** Using Ghost\
**Created:** [April 9, 2025, 12:30pm UTC](https://forum.ghost.org/t/unable-to-invite-new-admin-users-to-account-without-mailgun-setup/56711 "2025-04-09T12:30:12Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucys](https://avatars.discourse-cdn.com/v4/letter/l/ee59a6/32.png) [@lucys](https://forum.ghost.org/u/lucys)\
**Post date:** [April 9, 2025, 12:30pm UTC](https://forum.ghost.org/t/unable-to-invite-new-admin-users-to-account-without-mailgun-setup/56711/1 "2025-04-09T12:30:12Z")

</div>

We’re having issues where we cannot invite any new staff into the account as admin / editors etc. We’re getting an error message telling us the invitation failed to send and to check our mailgun settings.

We’ve never had mailgun setup as we do not have subscribers etc, and have previously been able to invite users, so feels like something has changed in the setup.

Does anyone have ay suggestions? are we going to have to setup a mailgun account purely to allow us to manage users within the account?

 ![image](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/b/c/bc7876de753b5e4c2b4e60db166296327f03777b.jpeg)

---

<div class="post-metadata">

**Author:** ![jannis](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/jannis/32/39718_2.png) [@jannis](https://forum.ghost.org/u/jannis)\
**Post date:** [April 9, 2025, 12:35pm UTC](https://forum.ghost.org/t/unable-to-invite-new-admin-users-to-account-without-mailgun-setup/56711/2 "2025-04-09T12:35:04Z")

</div>

The error is probably about your mail configuration:

> **[Configuration - Adapt your publication to suit your needs](https://ghost.org/docs/config/#mail)**
>
> Find out how to configure your Ghost publication or override Ghost's default behaviour with robust config options, including mail, storage, scheduling and more!

Can you send other transactional emails like password resets for admin users, magic links for members, etc.? My guess is not.

I assume you’re self-hosting, right? In that case, check your Ghost server logs to see what errors you see there in regard to the emails. This should work by running `ghost log` in the directory you have Ghost installed:

> **[Ghost-CLI - A fully loaded tool for installation and configuration](https://ghost.org/docs/ghost-cli/#ghost-log)**
>
> The best way to install, manage, and update your site locally or when self-hosting Ghost. A full guide for our advanced CLI tool.

If you’re self-hosting with Docker, run `docker logs [your-container-name]` to see what’s going on.

If you are not self-hosting, and on a managed hosting platform, reach out to their support, so they can have a look.

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [April 9, 2025, 2:10pm UTC](https://forum.ghost.org/t/unable-to-invite-new-admin-users-to-account-without-mailgun-setup/56711/3 "2025-04-09T14:10:13Z")

</div>

Going out on a limb (but read your logs like Jannis says) - your host recently reconfigured things so that you can’t use whatever port you’re currently using for transactional email. (This happened recently at Digital Ocean – ports that worked previously no longer do, with the exception of 2525 – for now..)

You don’t have to use Mailgun, but you do have to configure something that can send outbound transactional email. This is done in config.production.json, or with the equivalent environment variables.

---

<div class="post-metadata">

**Author:** ![joe-blocher](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/joe-blocher/32/27872_2.png) [@joe-blocher](https://forum.ghost.org/u/joe-blocher)\
**Post date:** [April 10, 2025, 6:27am UTC](https://forum.ghost.org/t/unable-to-invite-new-admin-users-to-account-without-mailgun-setup/56711/4 "2025-04-10T06:27:35Z")

</div>

The configuration options in the documentation above only state:

- Configuring with Mailgun
- Amazon SES

You don’t necessarily need Mailgun as a mail provider to invite any new staff …

I miss a simple SMTP configuration.  
It would be good to specify this as well in the documentation:

```auto
...
"mail": {
  "transport": "SMTP",
  "from": "website@domain.com",
  "options": {
    "host": "mail.domain.com",
    "port": 587,
    "auth": {
      "user": "user@domain.com",
      "pass": "1234"
    }
  }
},
...

```

`"from"` entry is important, otherwise it won’t work.

There are other `options`:

- **secure** - if _true_ the connection will use TLS when connecting to server. If _false_ (the default) then TLS is used if server supports the STARTTLS extension
- **pool** - set to _true_ to use pooled connections (defaults to _false_) instead of creating a new connection for every email
- …

See:

> **[SMTP transport :: Nodemailer](https://www.nodemailer.com/smtp/)**
>
> Nodemailer is a module for Node.js to send emails

---

<div class="post-metadata">

**Author:** ![joe-blocher](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/joe-blocher/32/27872_2.png) [@joe-blocher](https://forum.ghost.org/u/joe-blocher)\
**Post date:** [April 11, 2025, 5:40am UTC](https://forum.ghost.org/t/unable-to-invite-new-admin-users-to-account-without-mailgun-setup/56711/5 "2025-04-11T05:40:13Z")

</div>

A good solution for creating user without email you can find here:

> [@Creating new authors](https://forum.ghost.org/t/creating-new-authors/48694/5):
>
> Using the Universal Import, you can upload placeholder authors via JSON. The import doesn’t generate emails and the account doesn’t need to be accepted by anyone so you can use anything that validates as an email address here. You can then edit the email, slug, name and role for one of these placeholders from inside admin each time you want to issue an author account to a real person. They’ll need to do a password reset from /ghost/#/signin to start using the login if that’s what they’re going …

I created a commandline tool, but I‘m not sure if it works. Only tested in local install:

> [@Commandline tool to create user](https://forum.ghost.org/t/commandline-tool-to-create-user/53279):
>
> Inspired by [wasaluduckworth/add-admin-user-programmatically-in-ghost](https://medium.com/@wasaluduckworth/add-admin-user-programmatically-in-ghost-3488df51df24) I have created a tool for adding users manually without the need for invite with mail. Create as js-file “users.js” in the root-directory of your ghost website users.js require('./current/core/server/models/role'); const UserModel = require('./current/core/server/models/user'); const {Command} = require('./current/node\_modules/commander'); const program = new Command(); program.command('add') .descr…

---

<div class="post-metadata">

**Author:** ![ghostuser12039](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@ghostuser12039](https://forum.ghost.org/u/ghostuser12039)\
**Post date:** [May 15, 2025, 5:49am UTC](https://forum.ghost.org/t/unable-to-invite-new-admin-users-to-account-without-mailgun-setup/56711/6 "2025-05-15T05:49:19Z")

</div>

This is ridiculous to have email required for user login, I’m running an offline/intranet deployment, I’ve not enabled 2FA/MailFA.

When signed into one admin portal with the account its all fine.  
When I try to sign into the admin portal with the same account but with a different cookie profile, the error appears.

This is with a vanilla deployment FYI.

Looks like Mail/2FA is enforced by default which is silly for self-host users who dont need it… I actually even played with resetting hashes originally which worked but the error log still complains about mail!

To be advised to only use older Ghost builds is silly also.

---

<div class="post-metadata">

**Author:** ![jannis](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/jannis/32/39718_2.png) [@jannis](https://forum.ghost.org/u/jannis)\
**Post date:** [May 15, 2025, 6:09am UTC](https://forum.ghost.org/t/unable-to-invite-new-admin-users-to-account-without-mailgun-setup/56711/7 "2025-05-15T06:09:53Z")

</div>

You can disable it:

> **[Configuration - Adapt your publication to suit your needs](https://ghost.org/docs/config/#security)**
>
> Find out how to configure your Ghost publication or override Ghost's default behaviour with robust config options, including mail, storage, scheduling and more!

I wrote my initial post here a few days after everything was released. So, at the time, the advice wasn’t silly, but the information available.

---

<div class="post-metadata">

**Author:** ![ghostuser12039](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@ghostuser12039](https://forum.ghost.org/u/ghostuser12039)\
**Post date:** [May 15, 2025, 6:25am UTC](https://forum.ghost.org/t/unable-to-invite-new-admin-users-to-account-without-mailgun-setup/56711/8 "2025-05-15T06:25:06Z")

</div>

Thanks for the update, appreciate it.  
Is there a user env var for docker deployments? Since config.production.json is in ephemeral storage, I’d like to pass it as an environment variable.

Edit: I assume its “security\_\_staffDeviceVerification: disable”  
Edit2: Confirming the above env\_var works for docker deployments

---

<div class="post-metadata">

**Author:** ![leonat](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/leonat/32/35366_2.png) [@leonat](https://forum.ghost.org/u/leonat)\
**Post date:** [May 15, 2025, 2:01pm UTC](https://forum.ghost.org/t/unable-to-invite-new-admin-users-to-account-without-mailgun-setup/56711/9 "2025-05-15T14:01:13Z")

</div>

since the latest update i need to have email setup **locally** to login into the ghost backend.  
how can i disable auth code verification on localhost?

```auto
[2025-05-15 15:56:49] ERROR "POST /ghost/api/admin/session" 500 222ms

NAME: EmailError
MESSAGE: Failed to send email. Please check your site configuration and try again.

level: normal

"Please see https://ghost.org/docs/config/#mail for instructions on configuring email."
EmailError: Failed to send email. Please check your site configuration and try again.
    at Object.sendAuthCodeToUser (/Users/leonard/Documents/3_WORK/2025/surplus/ghost.nosync/versions/5.119.3/core/server/services/auth/session/session-service.js:284:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async Object.createSession (/Users/leonard/Documents/3_WORK/2025/surplus/ghost.nosync/versions/5.119.3/core/server/services/auth/session/middleware.js:16:17)

[2025-05-15 15:57:29] ERROR "POST /ghost/api/admin/session" 500 435ms

NAME: EmailError
MESSAGE: Failed to send email. Please check your site configuration and try again.

level: normal

"Please see https://ghost.org/docs/config/#mail for instructions on configuring email."
EmailError: Failed to send email. Please check your site configuration and try again.
    at Object.sendAuthCodeToUser (/[redacted]/ghost.nosync/versions/5.119.3/core/server/services/auth/session/session-service.js:284:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async Object.createSession (/[redacted]/ghost.nosync/versions/5.119.3/core/server/services/auth/session/middleware.js:16:17)

```

```json
{
    "url": "http://localhost:2368/",
    "server": {
        "port": 2368,
        "host": "127.0.0.1"
    },
    "database": {
        "client": "sqlite3",
        "connection": {
            "filename": "[redacted]/ghost.nosync/content/data/ghost-local.db"
        }
    },
    "mail": {
        "transport": "Direct"
    },
    "logging": {
        "transports": ["file", "stdout"]
    },
    "process": "local",
    "paths": {
        "contentPath": "[redacted]/ghost.nosync/content"
    }
}

```

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [May 15, 2025, 2:53pm UTC](https://forum.ghost.org/t/unable-to-invite-new-admin-users-to-account-without-mailgun-setup/56711/10 "2025-05-15T14:53:34Z")

</div>

Please search before posting. Merging this with the other thread on the same topic. :)

---

<div class="post-metadata">

**Author:** ![leonat](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/leonat/32/35366_2.png) [@leonat](https://forum.ghost.org/u/leonat)\
**Post date:** [May 16, 2025, 7:40am UTC](https://forum.ghost.org/t/unable-to-invite-new-admin-users-to-account-without-mailgun-setup/56711/11 "2025-05-16T07:40:33Z")

</div>

thanks, i misread the others post title and thought it won’t work **with** mailgun setup.

---

<div class="post-metadata">

**Author:** ![phishing\_frenzy](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/phishing_frenzy/32/38560_2.png) [@phishing\_frenzy](https://forum.ghost.org/u/phishing_frenzy)\
**Post date:** [November 20, 2025, 8:59am UTC](https://forum.ghost.org/t/unable-to-invite-new-admin-users-to-account-without-mailgun-setup/56711/12 "2025-11-20T08:59:05Z")

</div>

“mail”: {  
“transport”: “SMTP”,  
“from”: “admin@example.com”, is important in config.production.json:

go to staff → invite contributor → and key in the email address and send the email, the output in the following confirmed the email had sent out without mailgun configuration

 ![image](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/c/3/c3128016b255674253098e6b9c0181bca91d2cf4.png)
