Open jaanuspoldre opened 5 months ago
No response
payload.sendMail function should throw error instead of returning the error. Or is there a specific reason for this?
payload.sendMail
https://github.com/payloadcms/payload/blob/0eb7b44735b8385ae5256fcf3b538fae0a11b84d/packages/payload/src/email/sendEmail.ts#L11
await payload.init({ ..., email: { transportOptions: { host: 'yourhost', secure: true, port: ..., auth: { user: 'blabla', pass: 'passbla', }, }, }, ... });
payload.sendEmail()
Actual: error is returned Expected: error is thrown
returned
thrown
2.11.2
working on this
Link to reproduction
No response
Describe the Bug
payload.sendMail
function should throw error instead of returning the error. Or is there a specific reason for this?https://github.com/payloadcms/payload/blob/0eb7b44735b8385ae5256fcf3b538fae0a11b84d/packages/payload/src/email/sendEmail.ts#L11
To Reproduce
payload.sendEmail()
Actual: error is
returned
Expected: error isthrown
Payload Version
2.11.2
Adapters and Plugins
No response