# Emails wont send over sendgrid

**URL:** <https://forum.ghost.org/t/emails-wont-send-over-sendgrid/5662>\
**Category:** Developer help\
**Created:** [February 15, 2019, 5:26am UTC](https://forum.ghost.org/t/emails-wont-send-over-sendgrid/5662 "2019-02-15T05:26:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zacck](https://avatars.discourse-cdn.com/v4/letter/z/a9adbd/32.png) [@zacck](https://forum.ghost.org/u/zacck)\
**Post date:** [February 15, 2019, 5:26am UTC](https://forum.ghost.org/t/emails-wont-send-over-sendgrid/5662/1 "2019-02-15T05:26:25Z")

</div>

Hi Team, I just spun up a new ghost instance using docker compose, everything seems to be going super well However whenerver I try ans send out invitation emails I get a big red bar at the top saying

> Error sending email: Failed to send email. Reason: Authentication required, invalid details provided. Please check your email settings and resend the invitation.

I am confused as to why this is the case although I have tried to set up the SendGrid using the avaible mail options see below for my docker compose  
version: ‘3.2’

```
services:

  ghost:
    image: ghost:latest
    ports:
      - xxxx:2368
    environment:
      url: url
      mail__transport: SMTP
      mail__host: smtp.sendgrid.net
      mail __options__ port: 587
      mail __options__ auth __user: apikey
      mail __options__ auth__pass: SG.xd
      mail __options__ service: Sendgrid
    volumes:
      - /opt/ghost_content:/var/lib/ghost/content

```

- What’s your URL? [http://blog.eatyourday.com](http://blog.eatyourday.com)
- What version of Ghost are you using? Ghost 2
- What configuration? Docker Compose
- What browser? Chrome
- What errors or information do you see in the console?  
[https://gist.github.com/zacck/e05a806e04a90c7e8c42bc1fe2914ee2](https://gist.github.com/zacck/e05a806e04a90c7e8c42bc1fe2914ee2)
- What steps could someone else take to reproduce the issue you’re having?  
Not sure

---

<div class="post-metadata">

**Author:** ![mikegcox](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mikegcox/32/2384_2.png) [@mikegcox](https://forum.ghost.org/u/mikegcox)\
**Post date:** [February 15, 2019, 12:37pm UTC](https://forum.ghost.org/t/emails-wont-send-over-sendgrid/5662/2 "2019-02-15T12:37:04Z")

</div>

Are you hosting on Digital Ocean? My mail quit working yesterday and I don’t know why. I think Digital Ocean is blocking. I use Mailgun and I get a similar error and the error comes up so fast that it leads me to think it is blocked at the server.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/b/ba9ce5100b8bb264586f4f572545596b2ce3f081.png) [@system](https://forum.ghost.org/u/system)\
**Post date:** [March 1, 2019, 12:37pm UTC](https://forum.ghost.org/t/emails-wont-send-over-sendgrid/5662/3 "2019-03-01T12:37:05Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
