Temporary fork untill goetas fix the bug

2.1.1 2018-02-20 12:33 UTC


Parse a generic mail stream, and convert it to a SwiftMailer Message object

Build Status Code Coverage Scrutinizer Code Quality

Installing (composer)

composer requre goetas/to-swift-mime-parser



$parser = new \Goetas\Mail\ToSwiftMailParser\MimeParser();

// read a mail message saved into eml format (or similar)
$inputStream = fopen('mail.eml', 'rb');

$mail = $parser->parseStream($inputStream); // now $mail is a \Swift_Message  object

// edit the email
$mail->setSubject("New Subject");

// optionally loop through mail parts (and edit it!)
// $mail->getChildren();

// send a new mail