Skip to content

Instantly share code, notes, and snippets.

@Saifadin
Created January 2, 2019 10:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Saifadin/be8c3a9c8ef733e97b11092ba8629530 to your computer and use it in GitHub Desktop.
Save Saifadin/be8c3a9c8ef733e97b11092ba8629530 to your computer and use it in GitHub Desktop.
import { renderEmail } from 'postonents';
import EmailContainer from '@company/email-templates';
// EmailContainer is the entry point for the service and it gets the data passed to it
const html = await renderEmail(EmailContainer, { lang: lang.toLowerCase(), template, emailData: data });
// generic send function
sendEmail(html);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment