Skip to content

Instantly share code, notes, and snippets.

@Saifadin
Created January 2, 2019 10:30
Show Gist options
  • Select an option

  • Save Saifadin/be8c3a9c8ef733e97b11092ba8629530 to your computer and use it in GitHub Desktop.

Select an option

Save Saifadin/be8c3a9c8ef733e97b11092ba8629530 to your computer and use it in GitHub Desktop.

Revisions

  1. Saifadin created this gist Jan 2, 2019.
    8 changes: 8 additions & 0 deletions renderEmail2.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    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);