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-04-06 09:04:51 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!