Email Not Being Sent #1194
-
Bug ReportPayload's payload.sendEmail functionality not working. Current BehaviorEmail not being sent Expected BehaviorEmail Should be sent Possible SolutionSteps to ReproduceI can't say anything on payloads internal email configuration but the fs module error i'm getting can be reproduced with the below instructions.
Detailed DescriptionI was trying to work out payload CMS's email feature but not able to make it work. First i tried the SMTP with SendInBlue service, added the SMTP in .env and then configured the payload.init({}) function as instructed in documentation. I was sending email once a user create a new user account - hook - beforeChange. The email i tried to send does not recieved by the recipient but was there at SendInPlus Dashboard (not sure why). Then i tried the integration with SendGrid. Configured the paylaod as instructed in documentation but still it does not sent any email to recipient. After all that i tried to make it work manually as instructed in SendGrid Documentation using @sendgrid/mail NPM package, it only work 1 time and after that started giving some fs module errors. These are the errors i'm getting in console! ERROR in ./node_modules/@sendgrid/client/node_modules/@sendgrid/helpers/classes/attachment.js 9:11-24 ERROR in ./node_modules/@sendgrid/mail/node_modules/@sendgrid/helpers/classes/attachment.js 9:11-24 I only have one collection configured Users.ts |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
OK so here's some info for you. Out of the box, Payload does not send email to your users' inboxes. It comes configured with Ethereal Email which allows you to test and debug your email, but to see the emails, you need to log into Ethereal Email. See the docs here regarding how you can log your Ethereal credentials to log in: https://payloadcms.com/docs/email/overview#mock-transport Now, for configuring real transports. I'm going to guess that your SendInBlue configuration was wrong if the email showed up in the SendInPlus dashboard but not actually delivered. This could be due to MX records or similar not being correctly configured, causing your email to get either blocked or marked as spam. Email is a fickle beast, I'm afraid.. Now, for the last I'd put your whole See the docs here for more: https://payloadcms.com/docs/admin/webpack#aliasing-server-only-modules I'm gonna convert this over to a discussion but I am happy to continue helping here! |
Beta Was this translation helpful? Give feedback.
OK so here's some info for you.
Out of the box, Payload does not send email to your users' inboxes. It comes configured with Ethereal Email which allows you to test and debug your email, but to see the emails, you need to log into Ethereal Email. See the docs here regarding how you can log your Ethereal credentials to log in:
https://payloadcms.com/docs/email/overview#mock-transport
Now, for configuring real transports. I'm going to guess that your SendInBlue configuration was wrong if the email showed up in the SendInPlus dashboard but not actually delivered. This could be due to MX records or similar not being correctly configured, causing your email to get either blocked or marked as s…