https://github.com/adamlc/premailer-cli-wrapper
PHP CLI wrapper for https://github.com/premailer/premailer
https://github.com/adamlc/premailer-cli-wrapper
Last synced: about 1 year ago
JSON representation
PHP CLI wrapper for https://github.com/premailer/premailer
- Host: GitHub
- URL: https://github.com/adamlc/premailer-cli-wrapper
- Owner: adamlc
- Created: 2014-04-17T10:30:47.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-11-03T18:56:19.000Z (over 11 years ago)
- Last Synced: 2025-04-01T20:00:04.774Z (over 1 year ago)
- Language: PHP
- Size: 197 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Premailer CLI Wrapper
=====================
This library is a PHP CLI wrapper for [Premailer](https://github.com/premailer/premailer). Premailer is a tool to inline all of your CSS to ensure best compatibility with email clients.
Premailer is written in Ruby, but can be accessed via a CLI. You will first need to install the Rubygem:
```bash
sudo gem install premailer
```
## Install via Composer
To install AddressFormat as a Composer package add this to your composer.json:
```json
"adamlc/premailer-cli-wrapper": "0.0.*"
```
Run `composer update`
## 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.
```php
setBody('
Hello world
');
//Get the parsed body of the email
$html = $email->getHtml();
$text = $email->getText();
```
Thats pretty much it!
##TODO
* Write some unit tests.
* Error checking / Exceptions
* Use filesystem abstraction library
* Additional Premailer options. Such as remove scripts etc