mrferos/email-stripper

A library to strip things from email, namely quoted replies and signatures.

dev-master 2017-11-02 19:20 UTC

This package is auto-updated.

Last update: 2024-11-06 10:18:09 UTC


README

Travis-CI Scrutinizer-CI

Email-Stripper

A library to strip things from email, right now it's just quoted replies. Hoping to reliably get signatures soon.

Code Examples

$emailStripper = new \EmailStripper\EmailStripper;
$emailStripper->addStripper('QuotedReplies');
$strippedMessage = $emailStripper->strip($message);

Adding your own stripper

Your need to write a class that implements the StripperInterface which contains three methods:

  • setMessage
  • has
  • strip

Afterwards you can call addStripper with either an object or classpath.

$emailStripper = new \EmailStripper\EmailStripper;
$emailStripper->addStripper('My\Customer\Stripper');

That's it!