defectivecode / mjml
Installs: 21 318
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 0
Open Issues: 0
Type:laravel
Requires
- php: >=8.2
- illuminate/support: *
Requires (Dev)
- laravel/pint: ^1.8
- nunomaduro/collision: ^7.0
- orchestra/testbench: ^8.3
- phpunit/phpunit: ^10.0
README
English | العربية | বাংলা | Bosanski | Deutsch | Español | Français | हिन्दी | Italiano | 日本語 | 한국어 | मराठी | Português | Русский | Kiswahili | தமிழ் | తెలుగు | Türkçe | اردو | Tiếng Việt | 中文
Introduction
MJML is a markup language specifically designed to simplify the process of coding responsive emails. Its semantic syntax ensures ease and simplicity, while its extensive library of standard components accelerates development and reduces the complexity of your email codebase. The open-source engine of MJML generates high-quality, responsive HTML that adheres to best practices. If you've experienced the frustrations of working with Outlook, this package is tailored for you.
Our MJML implementation serves as a wrapper for the official MJML API. It enables convenient compilation of MJML into HTML directly within PHP, without the need for NodeJS. This package is ideal for PHP applications that wish to incorporate MJML without the hassle of installing NodeJS and the MJML CLI.
Example
// Without Laravel (new MJML)->render( '<mjml><mj-body><mj-section><mj-column><mj-text>Hello World</mj-text></mj-column></mj-section></mj-body></mjml>' ); // Minified HTML (new MJML)->minify()->render( '<mjml><mj-body><mj-section><mj-column><mj-text>Hello World</mj-text></mj-column></mj-section></mj-body></mjml>' ); // With Laravel MJML::render( '<mjml><mj-body><mj-section><mj-column><mj-text>Hello World</mj-text></mj-column></mj-section></mj-body></mjml>' ); // With Laravel and minified HTML MJML::minify()->render( '<mjml><mj-body><mj-section><mj-column><mj-text>Hello World</mj-text></mj-column></mj-section></mj-body></mjml>' );
Documentation
You may read the documentation on our website.
License
The MIT License (MIT). Please see License File for more information.