Support Resend template variables when exporting to Resend #2715
burnmaniac
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
{{{VAR}}}syntax when uploadingBackground
When you upload a template to Resend via the preview server, the resulting template has no variables defined - even if your component clearly uses props.
For example, this component:
When uploaded, Resend dashboard shows "No variables" because the HTML just contains the literal
596853value, not{{{VERIFICATION_CODE}}}.Resend's API supports a
variablesparameter when creating templates:But there's currently no way to use this from React Email.
Proposal
Add an optional
ResendVariablesstatic property to email components:When exporting to Resend:
previewValuewith{{{key}}}in the HTMLI've got a working implementation locally, but I hacked it a bit, as I just wanted to see if it's working. Perhaps I could open a PR so it can be reviewed, and with some guidance, we could have a full solution, in case this is the way to go.
Beta Was this translation helpful? Give feedback.
All reactions