-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(mailer): Resend handler #9175
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments. Otherwise LGTM!
// I was not having success at passing attachment contents as strings directly | ||
// to the Resend client, so I'm going to transform them to Buffers if they are | ||
// strings. | ||
const transformedAttachments = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think other mail handlers will have a similar need? If so, break out into a util function? Can do that refactor later perhaps, unless easier to test individual function to convert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure. In theory resend allows the string type but passing them in directly was confusing when it was malformed in my basic tests.
Happy to either extract it out or even change the interface (not user facing but handler facing) to adapt to what we find more convenient as we add more handlers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, ok. Let's refactor/revisit when implementing other handlers like Postmark, etc etc
@Josh-Walker-GM approved and good to merge |
**Description** This is intended to be a mail handler which specifically uses the [resend node sdk](https://github.com/resendlabs/resend-node/tree/main). **Changes** 1. Adds a new resend mail handler which uses the resend node sdk to send mail. 2. Removes an unneeded `uuid` dependency from the in-memory mail handler. I noticed this when copying over the handler as a template for this new one. **Notes** 1. I had to add a transformation of the attachment contents when they were passed as a string. If I did not transform them into a buffer then the attachment content would be malformed during my testing. 2. I have tested this manually but for the moment there is no specific testing suite/strategy in place to test these mail handlers/renderers.
Description
This is intended to be a mail handler which specifically uses the resend node sdk.
Changes
uuid
dependency from the in-memory mail handler. I noticed this when copying over the handler as a template for this new one.Notes