I want to use jsx-email with Golang, and in order to do that, I need to render the emails to HTML first and then import them as strings/files in my Golang app. My email templates have some custom properties that I want to set dynamically while building the HTML files.
This should potentially allow the use of templates created by JSX-email with almost any programming language.
Hey thanks for the issue. This is already possible with the --props flag, which accepts JSON. Run email help build for a full list of flags for that command.
Feature Use Case
I want to use jsx-email with Golang, and in order to do that, I need to render the emails to HTML first and then import them as strings/files in my Golang app. My email templates have some custom properties that I want to set dynamically while building the HTML files.
This should potentially allow the use of templates created by JSX-email with almost any programming language.
Feature Proposal
Let's say we have this template:
I want to be able to do something like this:
email build ./email.tsx --title="Click me"
Being able to pass custom props to the CLI tool allows to generate emails programmatically in any language that supports spawning new CLI processes.