HTML Body File Template with Variables
Open
question
- Dominant language
- Swift
- Stars
- 290
- Forks
- 68
- PR merge metrics
- No merged PRs in 30d
Description
Other SMTP / email libraries for JS or Python have the ability to "render" an html files and pass through variables.
ie.. pseudo code:
```
var htmlTemplate = fs.readFileSync('./views/email-welcome.html', 'utf-8')
data = {
orgName: organizationName,
orgTitle: orgTitle,
email: email,
}
var emailHTML = ejs.render(htmlTemplate, data);
_sendMailgunEmail(from, email, 'Welcome to my app!', emailHTML);
```
I know I can pass html as a string and use variable that way, but that would make a for a lot in one file. Any other suggestions or could something like this be possible as feature request?
Contributor guide
Assessment
This issue has not been assessed yet.