-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
Describe the Bug
When an email has an attachment, and you use react it will send a blank email with only the attachment.
This will NOT work and send a blank email with only the attachment:
const { error } = await resend.emails.send({
from: 'Know Thyself 360° <[email protected]>',
to: [recipient.email],
subject,
react: ShareReport({
name: recipient.name,
message
}),
attachments: [
{
content: pdfBase64,
filename: `${reportOwnerName} - 360 Feedback Report.pdf`
}
]
})This will work:
const emailHtml = await render(
ShareReport({
name: recipient.name,
message
})
)
const { error } = await resend.emails.send({
from: 'Know Thyself 360° <[email protected]>',
to: [recipient.email],
subject,
html: emailHtml,
attachments: [
{
content: pdfBase64,
filename: `${reportOwnerName} - 360 Feedback Report.pdf`
}
]
})Link to the code that reproduces this issue
See code above. Going from react to html fixes the issue but is clearly a bug.
To Reproduce
Described above
Expected Behavior
Should work when using react:
What's your node version? (if relevant)
v22.12.0
kevinlandsberg and pascalmtts
Metadata
Metadata
Assignees
Labels
No labels