email-book

email template tool

email-book

Have you ever annoyed to 'follow the mail format' order by your team or organization? Then this may help you.

This tool create a single html file, which includes mail templates data as html 'mailto' link.

When you click the link, your mailer will open and mail data(subject,to,css,body) will be complemented.

    npm install email-book -g

step1

create email template with xml

    <email>
        <to>okuni@emaple.com</to>
        <subject>hey, there</subject>
        <body>
            Hello! This is me.
 
            and there....
        </body>
    </email>

step2 generate html file

puts xml files in your data directory and run

    emailbook <data-dir> <out-file>

*step3 Open the html with your browser.

'mailto' link will appear!

You can put dynamic expression in your template.

    <email>
        <body>
            Hello! This is {{myname}}.
 
            and there....
        </body>
    </email>

After generate html, open it with query to injext.

 file://your_local_path/email-book.html?myname=John

"{{myname}}" will be renderd as John