forwardemail / email-templates

Create, preview (browser/iOS Simulator), and send custom email templates for Node.js. Made for @forwardemail, @ladjs, @cabinjs, @spamscanner, and @breejs.
https://forwardemail.net/docs/send-emails-with-node-js-javascript
MIT License
3.64k stars 339 forks source link

Ability to preview email in browser without actually sending it #421

Closed tar-aldev closed 3 years ago

tar-aldev commented 3 years ago

Sorry to post this here, it is more like a feature request.

I came to some scenarious where I want to use this library only to preview emails in browser. What I do now is

new Email({
      message: {
        // we will never actually send anything
        // so email can be any email
        from: ''
      },
      send: false,

But I still need to call email.send;

I know that it might be a little bit out of scope, but it would be really convenient to have a method inside email, something like email.previewInBrowser or something like this.

niftylettuce commented 3 years ago

PR would be welcome!