Git Product home page Git Product logo

mjml-react-example's Introduction

mjml-react example project

The aim of this project is to show usage of mjml and mjml-react inside a node js.

Usage

git clone [email protected]:wix-incubator/mjml-react-example.git
cd mjml-react-example
npm install
npm start

and afterwards just open your browser using the link http://localhost:3000/.

The http server will listen and restart upon each change inside src folder. You just need to refresh a browser window manually.

Running from command line

You can also run and get your email inside console:

npm run build
npm run generate

And you can automate things by sending the generated email to your test inbox:

npm run build
npm run generate | mail -s "$(echo -e "This is a test email\nContent-Type: text/html")" [email protected]

mjml-react-example's People

Contributors

github-sheriff avatar mastertheblaster 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

Watchers

 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

mjml-react-example's Issues

Retrospective

Hey there!

Are you guys using this library internally for rendering your react/mjml based emails? Is the purpose of this library to output the standard HTML, much like the regular MJML library? I'm interested in outputting static HTML using the MJML library, and react + styled components to share styles between our react web, react-native, and email templates.

Great library! Thanks for creating it!

Relative Paths not working on MJML with mjml-react

I have a template being shipped with nodemailer and all works just fine, except for the fact that I am getting broken images on the email, once received on the inbox.

Relative paths do not work at all. I have also tried some links from images in the web, google drive, google images, and they also not work.

The only links that work are links that end with the file name/type (e.g ......jpg) , like the src below:

 <MjmlImage
              width="400px"
              src="https://image.shutterstock.com/image-photo/bright-spring-view-cameo-island-260nw-1048185397.jpg"
            ></MjmlImage>

I tried using mjml-with-images-loader and configured the module exports on my NextJs config file, but nothing worked. I guess that it did not work due to the fact that I am using mjml-react on top of the raw mjml syntax.

Thanks in advance for any help on this as I do not know what is the best solution regarding the image path links, if I can get the local relative paths to be transformed into html string or if I should get these images on the web and then referentiate them on my src

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.