Download the PHP package kcs/mjml without Composer

On this page you can find all versions of the php package kcs/mjml. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mjml

mjml-php

PHP extension that embeds MRML, the MJML rendering engine written in Rust, so that you can render MJML templates directly from PHP without shelling out to a CLI tool.

Documentation

The full documentation lives under troubleshooting.

To preview the site locally install MkDocs and run:

This command proxies to mkdocs serve using the navigation defined in mkdocs.yml.

Overview

Requirements

Note: On Alpine Linux install php-dev, cargo, clang-dev, openssl-dev, and build-base. On Debian/Ubuntu use apt install php-dev rustc cargo build-essential libclang-dev libssl-dev.

Installation

Build from source

After installation, enable the extension in your php.ini (see Configuration). During development you can load the module from the build tree instead of running make install:

Composer / packaged distribution

The project is published as a Composer package (kcs/mjml). You can pull the extension into your project with:

PIE will place the extension artefact under the PHP extension directory (and enable it, if possible).

Configuration

Add one of the following lines to your PHP configuration:

When using PHP-FPM or Apache, restart the service so the new module is loaded.

Usage

render and renderFile both return an instance of Mjml\Email, exposing:

Constructor options

Pass an associative array to new Mjml($options) to tweak the renderer:

Option Type Default Notes
disable_comments bool false Non-boolean values raise a TypeError. When true, HTML comments emitted by MRML are stripped.
social_icon_origin string https://www.mailjet.com/images/theme/v1/icons/ico-social/ Must be a non-empty string. Controls the base URL used by <mj-social-element> icons.
fonts array<string, string> Mjml::defaultFonts() Keys are font names and values the font URL. Passing anything other than string keys/values triggers a validation error.

Default fonts

Outputs an associative array similar to:

Font name URL
Open Sans https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,700
Droid Sans https://fonts.googleapis.com/css?family=Droid+Sans:300,400,500,700
Lato https://fonts.googleapis.com/css?family=Lato:300,400,500,700
Roboto https://fonts.googleapis.com/css?family=Roboto:300,400,500,700
Ubuntu https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700

Troubleshooting

License

Licensed under the MIT License.

Contributing

  1. Fork the repository and create a feature branch.
  2. Build the extension locally (see Build from source).
  3. Run the PHPT test suite before submitting a pull request:

    Integration scenarios live under tests/integration/.

  4. Follow the existing coding style and commit conventions, then open a pull request.

All versions of mjml with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kcs/mjml contains the following files

Loading the files please wait ...