Skip to content

Instantly share code, notes, and snippets.

@Saifadin

Saifadin/renderEmail.js

Last active Jan 2, 2019
Embed
What would you like to do?
import { renderEmail } from 'postonents';
import VerificationCodeMail from './templates/VerificationCode';
...
// Get your email templates, pass it as the entry point for the server side rendering
// data in this case should align with the data needed in the template
const html = renderEmail(VerificationCodeMail, { lang: 'en', data });
// This is just a generic send function
sendEmail(html);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment