Skip to content

Instantly share code, notes, and snippets.

@Saifadin
Last active January 2, 2019 09:47
Show Gist options
  • Save Saifadin/0edf4d60b59a8138ca3805170ae277b5 to your computer and use it in GitHub Desktop.
Save Saifadin/0edf4d60b59a8138ca3805170ae277b5 to your computer and use it in GitHub Desktop.
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