/** * Receives a raw email, parses it into an email object, decodes it, * instantiates a new mailer, and passes the email object to the mailer * object's #receive method. If you want your mailer to be able to * process incoming messages, you'll need to implement a #receive * method that accepts the email object as a parameter and then call * the AkActionMailer::recieve method using "parent::recieve($Mail);" * * * class MyMailer extends AkActionMailer{ * function receive($Mail){ * parent::recieve($Mail); * ... * } * } */ function receive($raw_mail) { $this->_MailDriver =& AkMail::parse($raw_mail); return $this->_MailDriver; }
function test_unquote_base64_body() { $msg = <<<EOF From: me@example.com Subject: subject Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: base64 VGhlIGJvZHk= EOF; $Mail = AkMail::parse($msg); $this->assertEqual("The body", $Mail->body); $this->assertEqual("VGhlIGJvZHk=", $Mail->getBody()); }