My member can't subscribe

I have problem with problem with email subscription, when someone enter his email and hit signup button there was a problem, that show `failed send magic link’
I also didn’t receive any email verification when I was creating an admin account on my website.
and i didnt change any email configuration setting yet,

for hosting I use Ubuntu 22.04.2 LTS as self hosting
thanks

thanks

What transactional email settings have you used?

I used default setting, i didn’t change any configuration yet

Please share the config.

I have changed the configuration with mailgun and it worked, but it some cases when I try with different email it doesn’t work and return can’t send magic link again

Without seeing the config files, I am unable to assist.

I apologize
this was my config file

{
  "url": "https://rumahpenguin.id",
  "server": {
    "port": 2368,
    "host": "127.0.0.1"
  },
  "database": {
    "client": "mysql",
    "connection": {
      "host": "localhost",
      "user": "admin",
      "password": "password",
      "database": "website_db"
    }
  },
  "mail": {
    "from": "noreply@rumahpenguin.id",
    "transport": "SMTP",
    "options": {
      "service": "Mailgun",
      "host": "smtp.mailgun.org",
      "port": 465,
      "secure": true,
      "auth": {
        "user": "myuser,
        "pass": "mypassword"
      }
    }
  },
  "tls": {
    "rejectUnauthorized": false
  },
  "logging": {
    "transports": ["file", "stdout"]
  },
  "process": "systemd",
  "paths": {
    "contentPath": "/var/www/rumahpenguin.id/content"
  }
}

There’s nothing obvious I see wrong with the mail section, although I recommend using StartTLS since this is the corrected method.

Incidentally, by setting rejectUnauthorized: false , you’re not verifying the server’s identity, and is not a good idea (the default is true.). Why did you add this to the config?

i got it from the forum,
ok i’ll try your suggestion

It still didn’t work
I got same error

You can’t simply change to StartTLS. Port changes to 587, and secure connection is false (TLS starts negotiation over plain text.)

Regarding rejectUnauthorized, unless there’s a specific reason for inclusion, I’d remove it from the config.

Finally, you need to restart ghost for settings to apply.

I removed it, and I do ghost restart, but it still got same error

Take a look at the SMTP section in the documentation below, and use Swaks to test.

https://documentation.mailgun.com/en/latest/quickstart-sending.html

2 Likes

I apologize, I have some jobs to do first
I’ll try your suggestions
Thanks