nodebb-plugin-emailer-sendgrid not sending emails
-
I've added the plugin and the API key, but no-one gets any emails from my forum. I've followed the instructions multiple times, restarted several times and used the API key via cURL to confirm it works (copied and pasted it out of nodeBB to be sure it's the same), which it does.
Trawling through the startup logs, I can see
2024-10-27T15:53:38.103Z [4567/12061] - [32minfo[39m: [plugins/emailer-sendgrid] Custom field nodebb_username already exists, OK. 2024-10-27T15:53:38.162Z [4567/12061] - [32minfo[39m: [plugins/emailer-sendgrid] Custom field nodebb_fullname already exists, OK. 2024-10-27T15:53:38.162Z [4567/12061] - [32minfo[39m: [plugins/emailer-sendgrid] Done.
so that looks good. If I go to the events, I can see:
{ "confirm_code": "[confirm code]", "email": "[user's email]", "force": true, "timestamp": 1730038787173 }
so that looks good too. I've been through the source code for the plugin and I can see where Winston would log something out if there was an issue, but there's nothing in the logs - after all the SASS deprecation warnings, nothing else gets posted. I've enabled port 1337 on my server's firewall to ensure the connections stay alive, in case that's relevant.
Do I need to open port 25 for SMTP? Thanks!
-
@DrRelling yes, you'll need port 25 for outbound email to work.
-
-
You shouldn't need SMTP for the sendgrid mailer. It uses the sendgrid API to send mail messages, and optionally, allows for an inbound webhook to receive messages. Have you looked at the activity logs in the sendgrid console to verify that your requests are being handled? If needed, you can add a console log to the
Emailer.send
method in thenodebb-plugin-emailer-sendgrid
index.js
file if you want to debug the message handling.