2017 © Pedro Peláez
 

library premailer-cli-wrapper

PHP CLI wrapper for Premailer (https://github.com/premailer/premailer)

image

adamlc/premailer-cli-wrapper

PHP CLI wrapper for Premailer (https://github.com/premailer/premailer)

  • Monday, November 3, 2014
  • by adamlc
  • Repository
  • 1 Watchers
  • 1 Stars
  • 11,256 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 5 % Grown

The README.md

Premailer CLI Wrapper

This library is a PHP CLI wrapper for Premailer. Premailer is a tool to inline all of your CSS to ensure best compatibility with email clients., (*1)

Premailer is written in Ruby, but can be accessed via a CLI. You will first need to install the Rubygem:, (*2)

sudo gem install premailer

Install via Composer

To install AddressFormat as a Composer package add this to your composer.json:, (*3)

"adamlc/premailer-cli-wrapper": "0.0.*"

Run composer update, (*4)

Usage Instructions

WARNING! This library currently doesn't have any unit tests and very much error checking. It will develop over time as I begin to use it in Production., (*5)

<?php

use Adamlc\Premailer\Command;
use Adamlc\Premailer\Email;

//Path to Premailer Binary
$command = new Command('/usr/bin/premailer');

//Create a new email instance, passing the Command instance
$email = new Email($command);

//Set the body of the Email
$email->setBody('

Hello world

'); //Get the parsed body of the email $html = $email->getHtml(); $text = $email->getText();

Thats pretty much it!, (*6)

TODO

  • Write some unit tests.
  • Error checking / Exceptions
  • Use filesystem abstraction library
  • Additional Premailer options. Such as remove scripts etc

The Versions

03/11 2014

dev-master

9999999-dev

PHP CLI wrapper for Premailer (https://github.com/premailer/premailer)

  Sources   Download

MIT

The Requires

 

by Adam Curtis

03/11 2014

0.0.4

0.0.4.0

PHP CLI wrapper for Premailer (https://github.com/premailer/premailer)

  Sources   Download

MIT

The Requires

 

by Adam Curtis

16/10 2014

0.0.3

0.0.3.0

PHP CLI wrapper for Premailer (https://github.com/premailer/premailer)

  Sources   Download

MIT

The Requires

 

by Adam Curtis

14/10 2014

0.0.2

0.0.2.0

PHP CLI wrapper for Premailer (https://github.com/premailer/premailer)

  Sources   Download

MIT

The Requires

 

by Adam Curtis

26/08 2014

0.0.1

0.0.1.0

PHP CLI wrapper for Premailer (https://github.com/premailer/premailer)

  Sources   Download

MIT

The Requires

 

by Adam Curtis