Git Product home page Git Product logo

mailmason's Introduction

MailMason

A complete toolset to streamline building and updating a set of consistent transactional emails.

Brought to you by Postmark

Few tasks are more tedious than building a consistent set of well-tested and beautiful transactional email templates for your application. Not any longer.

With MailMason, you can use Grunt tasks, Handlebars, and SASS to streamline building a consistent set of transactional email templates using layouts and partials to reduce redundancy and create both the HTML and plain text versions of your transactional emails in one fell swoop.

By default, the generated templates use Mustachio for the variable placeholders so that you can easily use them as Postmark templates. However, the Mustachio pieces are only placeholders, and the generated templates could easily be adapted to work with any email provider.

What does it do for you?

  • Gives you a thoroughly tested and reliable starting point for building consistent email templates
  • Uses Handlebars to enable layouts and partials in templates and avoid redundancy
  • Enables the use of SCSS for generating the styles
  • Automatically inlines the resulting CSS for testing email client compatibility
  • Automatically generates text versions of emails with the same content as the HTML versions
  • Enables easy sending of test emails through your Postmark account
  • Enables easy batch testing against the Postmark Spamcheck API
  • Enables easy batch testing through Litmus
  • Enables easy uploading of image assets to your CDN so you can include images in your templates (but you don't have to)
  • Enables easy template pushing to your Postmark account

Interested in contributing?

Read through our guidelines for contributing to help make contributions quick and easy.

Visit the wiki for documentation and usage

If you need help getting started or using MailMason, make sure to check out the MailMason wiki.

License

MailMason is licensed under the MIT license. Please refer to the LICENSE for more information.

mailmason's People

Contributors

derekrushforth avatar epd avatar garrettdimon avatar jeremy-jeha-lee avatar matt-west avatar neilbostrom avatar wagich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mailmason's Issues

Create plain text only email template

I know I am not supposed to ask use-case questions here as described here, but I am having no success elsewhere, plus if there is no answer to my question, this could become a feature request.

Currently, in mailmason a template with no Layout set, fills both HTML and Text versions of the email template in postmarkapp.

How do I create a template in mailmason so the HTML field in postmark will be empty, and Text set?

That is important for creating small size ticket emails without bloating customer service management service.

Live reload

The grunt config has livereload set to True, but when I open previews.html and make a change this does not reload the templates.

is there extra configuration needed?

i18n feature

Do you plan to ease the process of translating email templates?
I understand that postmark is for English-speaking developers, but do you have any feedback on maintaining templates in multiple languages with mailmason?

Links broken on wiki

Hello,

all the links to the examples on this page are broken, I get an S3 error:

<Error>
  <Code>AccessDenied</Code>
  <Message>Access Denied</Message>
  <RequestId>A116E771F9CE9625</RequestId>
  <HostId>TXWC1WrmFqhcwBAM87qR4zm50lQj1tJsoPMtK4Asg2Rt4+yITaBMhQgzbHUwcOKfXAVV4+YwAr0=</HostId>
</Error>

Replace premailer

We should replace premailer with something that's fully compatible through node. Requiring gems to be installed is kind of a mess.

Status of this library?

Not exactly sure who or where to reach out, but is this library still actively maintained? I know postmark still has a link to this repo but my biggest concern with using this library are the outdated dependencies. A lot of them haven't been updated in years.

Related, are there plans to using something a little more modern like webpack instead of grunt? I'm looking into expanding some of the functionality and would prefer to use es modules instead of the old commonJS way of doing things.

Thanks

Separate build process for templates stored in Postmark

We need to modify the build process for templates that are stored in PM. Since it's so specific to PM it shouldn't necessarily be reflected in MailMason, so we need to figure out how to keep this part of the build process separate and out of master.

Here's what needs to change:

  • Prevent premailer task from running – We're already using mustachio to inline CSS on PM.
  • Remove premailer properties from inline CSS – Should be fairly easy with the replace task.
  • Add an HTML comment above the style block"Style block is collapsed blah blah blah..." The idea you mentioned where we call it out if people can't find the collapsed style block.

One idea is to create a separate Postmark branch that gets used for this only. It would still be public but since it's not in master I don't think it's a huge deal. @garrettdimon thoughts?

task to push templates to Postmark

I'd like to tag a release, push my templates into Postmark, and then run a local hook to update my configuration database with the template IDs. I'm working on a first pass but wanted to open discussion on requirements if anyone has thoughts.

secrets.json is required?

Hi, I have just initiated the development of a project using mailmason. It looks very promising :)

When following your guide, it is stated that secrets.json is not required. However, I was met with the following error when using 'npm start':
..ERROR
>> Unable to process task.
Warning: Required config property "watch" missing.

When secrets.json was created everything works, so I expect there is some kind of ignore-function that is not activated?

Add local template test variables as currently in the Postmark

In Postmark you can view and edit the template and edit test variables to see how the template works with actual data however, it does not work locally. I even tried (just out of curiosity) to edit preview.html and add some variables as in the code below

<script>
    var templates = {
      "test_mail_template": {
         // name, description, and guide keys
         // and then template variables
        "template_entity_1": { "template_variable_1": "some custom value 1" },
        "template_entity_2": { "template_variable_2": "some custom value 2", "template_variable_2": "some custom value 3" }
      }
</script>

I think this is very useful not to push some unfinished templates to postmark and have the ability to test templates with actual content on your local machine

Consider this as a feature request, thank you

Outlook button and spacing issues

I'm wondering if this is intentional, or if there's an error on my end somewhere. Using the default example_config.json, and default templates, compiled using npm run build, I'm seeing the following differences between Firefox (left) and Outlook 2016 (right):

image

Obviously, I'd like the Outlook version to look identical to the browser. Is this possible?

Add MD5 hash on assets

Add MD5 hash on assets for explicit asset expiration when they change so we can aggressively cache assets.

Does the preheader feature work?

A few months ago I upgraded mailmason to take advantage of the built in deployment to postmark as well as the first class support for postmark Layouts. I think I broke preheaders when I made that change.

As far as I can tell Layouts only support the {{{ @content }}} placeholder and has no other mechanism for a template to inform the layout - for example by providing a preheader that should sit above all the other content in the Layout.

Is there a work around to get preheaders working? Thanks!

Required config property "watch" missing

Running "watch" task
Waiting...
Verifying property watch exists in config...ERROR

Unable to process task.
Warning: Required config property "watch" missing.

Running "watch" task
Waiting...
Verifying property watch exists in config...ERROR

Unable to process task.
Warning: Required config property "watch" missing.

Clear documentation

Hi there,

One issue which isn't really documented and there is currently only one workaround for is that it is not possible to have a layout use different values depending on the template.

For example, the preheader cannot be set from the template even though it appears that way from the source code. The reason for this is that the template and layout are uploaded separately and any variables that the layouts use that are set by the template are stripped away.

The workaround is to add the information as a Template Model field when sending the email (which is far from ideal).
This makes it difficult to do things like customize the footer depending on the template.

The documentation should be updated and the preheaders in the template code should be removed to make this clearer.

Cheers,
Stefan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.