Classes/Transport/MboxTransport.php
public function send(\Swift_Mime_SimpleMessage $message, &$failedRecipients = null)
    {
        $message->generateId();

        // Create a mbox-like header
        $mboxFrom = $this->getReversePath($message);
        $mboxDate = strftime('%c', $message->getDate()->getTimestamp());
        $messageString = sprintf('From %s %s', $mboxFrom, $mboxDate) . chr(10);

        // Add the complete mail inclusive headers
        $messageString .= $message->toString();
        $messageString .= chr(10) . chr(10);

        // Write the mbox file
        file_put_contents($this->mboxPathAndFilename, $messageString, FILE_APPEND | LOCK_EX);

        // Return every recipient as "delivered"
        return count((array)$message->getTo()) + count((array)$message->getCc()) + count((array)$message->getBcc());
    }
public function send(\Swift_Mime_SimpleMessage $message, &$failedRecipients = null)
    {
        $message->generateId();

        // Create a mbox-like header
        $mboxFrom = $this->getReversePath($message);
        $mboxDate = strftime('%c', $message->getDate()->getTimestamp());
        $messageString = sprintf('From %s %s', $mboxFrom, $mboxDate) . chr(10);

        // Add the complete mail inclusive headers
        $messageString .= $message->toString();
        $messageString .= chr(10) . chr(10);

        // Write the mbox file
        file_put_contents($this->mboxPathAndFilename, $messageString, FILE_APPEND | LOCK_EX);

        // Return every recipient as "delivered"
        return count((array)$message->getTo()) + count((array)$message->getCc()) + count((array)$message->getBcc());
    }
public function send ( \ Swift_Mime_SimpleMessage $ message , & $ failedRecipients = null ) { $ message -> generateId ( ) ; // Create a mbox-like header $ mboxFrom = $ this -> getReversePath ( $ message ) ; $ mboxDate = strftime ( '%c' , $ message -> getDate ( ) -> getTimestamp ( ) ) ; $ messageString = sprintf ( 'From %s %s' , $ mboxFrom , $ mboxDate ) . chr ( 10 ) ; // Add the complete mail inclusive headers $ messageString .= $ message -> toString ( ) ; $ messageString .= chr ( 10 ) . chr ( 10 ) ; // Write the mbox file file_put_contents ( $ this -> mboxPathAndFilename , $ messageString , FILE_APPEND | LOCK_EX ) ; // Return every recipient as "delivered" return count ( ( array ) $ message -> getTo ( ) ) + count ( ( array ) $ message -> getCc ( ) ) + count ( ( array ) $ message -> getBcc ( ) ) ; }
Outputs the mail to a text file according to RFC 4155.

@param \Swift_Mime_SimpleMessage $message The message to send
@param array &$failedRecipients Failed recipients (no failures in this transport)
@return int
Outputs the mail to a text file according to RFC 4155 .