How to try to Subscribe in Localhost? Failed to send magic link email

Hello,
I’m newbie here so I’m sorry if this question is not very interesting one.
I am developing a theme for a Ghost Blog bases on Casper theme in development environment.
I would like to know how to set up Subscription and test in the localhost.

When I Sign up, in Network it said
POST http://localhost:2368/members/api/send-magic-link/ 500 (Internal Server Error)
and in the UI it shows “Failed to send magic link email”

I would like to ask if it’s possible to test subscribe function in Localhost and how to set it properly?

My config.development.json
{
“url”: “http://localhost:2368/”,
“server”: {
“port”: 2368,
“host”: “127.0.0.1”
},
“database”: {
“client”: “sqlite3”,
“connection”: {
“filename”: “/Users/sakura/Developer/Ruby_base_v1/content/data/ghost-local.db”
}
},
“mail”: {
“transport”: “Direct”
},
“logging”: {
“transports”: [
“file”,
“stdout”
]
},
“process”: “local”,
“paths”: {
“contentPath”: “/Users/sakura/Developer/Ruby_base_v1/content”
}
}

Thank you very much for your time.

You don’t appear to have SMTP setup on your development box. This is necessary for transactional email.

More details of your environment are needed.

Thank you for a guide. I did some research and I came up with a SMTP setting which I change the config in “mail” in config.development.json.

“mail”: {
“transport”: “SMTP”,
“options”: {
“host”: “smtp.gmail.com”,
“port”: 587,
“auth”: {
“user”: “myemail@gmail.com”,
“pass”: “AppPassword”
}
}
},

I still get the same error “POST http://localhost:2368/members/api/send-magic-link/ 500 (Internal Server Error)” and “Failed to send magic link email” , but it’s quick respond and no need to wait and reload this time.

I don’t know what else I have to check or change.

Thank you for your support.

Take a look at the server logs: content/logs and Nginx. Also, check that port 587 is open.

I use those settings on my Windows dev box and it works great for me. Definitely check the logs - hopefully there’s a hint there!

Thanks to you all.
It works now.
I checked the Logs :error and it shows
"Error: Invalid login: 535-5.7.8 Username and Password not accepted. Learn more at\n535 5.7.8 Check Gmail through other email platforms - Gmail Help "
So it’s on Gmail side and I made it’s work now,

Thank you for your time n support, I guess I will be back soon :pray:

1 Like