loopback-action-mailer

ACTION MAILER FOR LOOPBACK =============

Usage no npm install needed!

<script type="module">
  import loopbackActionMailer from 'https://cdn.skypack.dev/loopback-action-mailer';
</script>

README

ACTION MAILER FOR LOOPBACK

This module is for the loopback framework. Module sends Mailgun's action emails.

INSTALL

  npm i loopback-action-mailer -S

USAGE

  Member.beforeRemote('register', (ctx) => {
    actionMailer(Member, {
      redirect: `${URL}/destination`,
      from: 'example@example.com',
      to: ctx.email,
      subject: 'Hello there!',
      templateData: {
        signature: 'Elon',
        buttonText: 'Click me',
        lines: [
          'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vitae vulputate sem.',
        ],
      },
    });
  });