# Member API: Send Magic Link | Ressource not found (500)

**URL:** <https://forum.ghost.org/t/member-api-send-magic-link-ressource-not-found-500/25926>\
**Category:** Developer help\
**Created:** [September 28, 2021, 7:03am UTC](https://forum.ghost.org/t/member-api-send-magic-link-ressource-not-found-500/25926 "2021-09-28T07:03:27Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel95](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/daniel95/32/14542_2.png) [@Daniel95](https://forum.ghost.org/u/Daniel95)\
**Post date:** [September 28, 2021, 7:03am UTC](https://forum.ghost.org/t/member-api-send-magic-link-ressource-not-found-500/25926/1 "2021-09-28T07:03:27Z")

</div>

Hello together,

I’ve recently updated to

- ghost 4.16.0
- ghost-cli 1.17.3

Since I’ve updated ghost, error occur when trying to send the magic link in order to registrate for the newsletter.

The following error is thrown `Failed to load resource: the server responded with a status of 500 ()`

while the .json-response for `/members/api/send-magic-link/` looks as follows:

```auto
{"errors":[{"message":"Resource not found","context":null,"type":"NotFoundError","details":null,"property":null,"help":null,"code":null,"id":"03631ad0-2028-11ec-af99-c329db18a6d9"}]}

```

There must be any issue with Nodemailer or the existence of paths. Does anyone have a hint on how to proceed from here and solve the issue?

Edit: Due to the critical security vulnerability, the path /members/api/send-magic-link/ a new endpoint has been established. That’s at least what I’ve understood from [Member account takeover · Advisory · TryGhost/Ghost · GitHub](https://github.com/TryGhost/Ghost/security/advisories/GHSA-65p7-pjj8-ggmr)

However, I am not sure now how to proceed

Best regards

---

<div class="post-metadata">

**Author:** ![egg](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/egg/32/1691_2.png) [@egg](https://forum.ghost.org/u/egg)\
**Post date:** [September 28, 2021, 8:52am UTC](https://forum.ghost.org/t/member-api-send-magic-link-ressource-not-found-500/25926/2 "2021-09-28T08:52:50Z")

</div>

Could you please share the error logs from your server too so we can help you debug? 🙂

---

<div class="post-metadata">

**Author:** ![Daniel95](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/daniel95/32/14542_2.png) [@Daniel95](https://forum.ghost.org/u/Daniel95)\
**Post date:** [September 28, 2021, 12:38pm UTC](https://forum.ghost.org/t/member-api-send-magic-link-ressource-not-found-500/25926/3 "2021-09-28T12:38:47Z")

</div>

Hi Fabien,

thanks for the reply. Attached you find the error logs

```auto
{
    "name": "Log",
    "hostname": "ghost-ubuntu-s-4vcpu-8gb-amd-fra1-01",
    "pid": 1226277,
    "level": 50,
    "err": {
        "id": "287663d0-2051-11ec-9ad4-27d8fa2b4118",
        "domain": "https://bitcoin-2go.de",
        "code": "ESOCKET",
        "name": "EmailError",
        "statusCode": 500,
        "level": "normal",
        "message": "Failed to send email. Reason: 140005995779968:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:\n.",
        "help": "\"Please see https://ghost.org/docs/config/#mail for instructions on configuring email.\"",
        "stack": "EmailError: Failed to send email. Reason: 140005995779968:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:\n.\n at createMailError (/var/www/ghost/versions/4.15.1/core/server/services/mail/GhostMailer.js:59:12)\n at GhostMailer.sendMail (/var/www/ghost/versions/4.15.1/core/server/services/mail/GhostMailer.js:119:19)\n at processTicksAndRejections (internal/process/task_queues.js:93:5)\n at async GhostMailer.send (/var/www/ghost/versions/4.15.1/core/server/services/mail/GhostMailer.js:105:26)\n at async MagicLink.sendMagicLink (/var/www/ghost/versions/4.15.1/node_modules/@tryghost/magic-link/lib/MagicLink.js:62:22)\n at async RouterController.sendMagicLink (/var/www/ghost/versions/4.15.1/node_modules/@tryghost/members-api/lib/controllers/router.js:236:17)\n\nError: 140005995779968:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:\n"
    },
    "msg": "Failed to send email. Reason: 140005995779968:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:\n.",
    "time": "2021-09-28T11:42:28.494Z",
    "v": 0
}

```

---

<div class="post-metadata">

**Author:** ![egg](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/egg/32/1691_2.png) [@egg](https://forum.ghost.org/u/egg)\
**Post date:** [September 28, 2021, 1:26pm UTC](https://forum.ghost.org/t/member-api-send-magic-link-ressource-not-found-500/25926/4 "2021-09-28T13:26:17Z")

</div>

Ah that looks like you’ve run into the same issue as this!

> [@Un-noticed(?) email config change in 4.15/16](https://forum.ghost.org/t/un-noticed-email-config-change-in-4-15-16/25869):
>
> It would be nice to get developer input or confirmation of this. After updating from 4.14 to 4.15.1 and 4.16 thereafter, I found that transactional emails through Mailgun stopped working entirely. The error given was the typical “SSL wrong version number” that many have issue with. The workaround for that was to replace "secureConnection": false with "secure": false in your Ghost production configuration file. The problem is that key is now called secure and so this broke my website upon up…

You should be able to update your config to use `secure` instead of `secureConnection` - we’ll get a fix for this in the next release

---

<div class="post-metadata">

**Author:** ![Daniel95](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/daniel95/32/14542_2.png) [@Daniel95](https://forum.ghost.org/u/Daniel95)\
**Post date:** [September 28, 2021, 1:49pm UTC](https://forum.ghost.org/t/member-api-send-magic-link-ressource-not-found-500/25926/5 "2021-09-28T13:49:58Z")

</div>

Indeed, I did run into the same issue.

With the provided link I was able to fix the problem. Appreciate the quick response 🙂 Have a great day!

---

<div class="post-metadata">

**Author:** ![autelles](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/autelles/32/16766_2.png) [@autelles](https://forum.ghost.org/u/autelles)\
**Post date:** [February 12, 2022, 7:38pm UTC](https://forum.ghost.org/t/member-api-send-magic-link-ressource-not-found-500/25926/6 "2022-02-12T19:38:22Z")

</div>

I am running into this same issue. I’m hosting on DigitalOcean, and here’s a copy of my mail settings in config.production.json (user/pass intentionally removed). I am able to get the newsletters, but I can’t login as a subscriber.

```auto
  "mail": {
    "transport": "SMTP",
    "options": {
      "service": "Mailgun",
      "host": "smtp.mailgun.org",
      "auth": {
        "user": "removed",
        "pass": "removed"
      }
    }
  }

```

---

<div class="post-metadata">

**Author:** ![nicolatoledo](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/nicolatoledo/32/19061_2.png) [@nicolatoledo](https://forum.ghost.org/u/nicolatoledo)\
**Post date:** [September 13, 2022, 2:28am UTC](https://forum.ghost.org/t/member-api-send-magic-link-ressource-not-found-500/25926/7 "2022-09-13T02:28:27Z")

</div>

did you resolved, ihave the same problem, but i’m using a different domani from the site domain so i don’t understand

---

<div class="post-metadata">

**Author:** ![vdrive6](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vdrive6/32/24309_2.png) [@vdrive6](https://forum.ghost.org/u/vdrive6)\
**Post date:** [July 9, 2023, 11:15am UTC](https://forum.ghost.org/t/member-api-send-magic-link-ressource-not-found-500/25926/9 "2023-07-09T11:15:06Z")

</div>

I’ve solved this by using SendGrid’s SMTP & API key. (Mailgun API key still used inside Ghost Admin)

---

<div class="post-metadata">

**Author:** ![buerofalk](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/buerofalk/32/26760_2.png) [@buerofalk](https://forum.ghost.org/u/buerofalk)\
**Post date:** [October 11, 2023, 1:23pm UTC](https://forum.ghost.org/t/member-api-send-magic-link-ressource-not-found-500/25926/10 "2023-10-11T13:23:53Z")

</div>

Had the same issue I solved it by using this inside config.production.json. Took me 2 days to figure it out. Used telnet to see which ports were open, changed it to 587 and then changed the secure option to false. Works perfectly. Leaving this here for my future self to find it 🙂

```auto
"mail": {
    "transport": "SMTP",
    "options": {
      "service": "Mailgun",
      "host": "smtp.eu.mailgun.org",
      "port": 587,
      "secureConnection": false,
      "auth": {
        "user": "mail@domain.com",
        "pass": "password"
      }
    }
  },

```
