2017 © Pedro Peláez
 

library mjml-php

A simple php library to consume use MJML rest API

image

juamiguelbesada/mjml-php

A simple php library to consume use MJML rest API

  • Thursday, June 21, 2018
  • by juanmiguelbesada
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

MJML PHP

A simple php library to consume use MJML rest API, (*1)

Installation

composer require juanmiguelbesada/mjml-php

How to use

<?php

use Mjml\Client;

$applicationId = '';
$secretKey = '';
$client = new Client($applicationId, $secretKey);

$mjml = '<mjml><mj-body><mj-container><mj-section><mj-column><mj-text>Hello World</mj-text></mj-column></mj-section></mj-container></mj-body></mjml>';
$message = $client->render($mjml);

$to = 'text@example.com';
$subject = 'My awesome email created with mjml';
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
mail($to, $subject, $message, $headers);

The Versions

21/06 2018

dev-master

9999999-dev

A simple php library to consume use MJML rest API

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

by Juan Miguel Besada