Framework:sb Email Writer

From Surebert wiki

Overview

Used to convert sb_Email instances into actual email data and to send and log the sending.

php code

When instanciating sb_Email_Writer pass instance of sb_Logger, otherwise it tries App::$logger or else instanciates a new instance of sb_Logger_FileSystem
//instanciate the email writer
$myEmailWriter = new sb_Email_Writer();
 
//add an instance of sb_Email to the outbox, you can add as many as you want
$myEmailWriter->add_email_to_outbox($myMail);
 
//then send, you could add more emails before sending
var_dump($myEmailWriter->send());