SwiftMailer/SendListener.php
private function logCreate(\Swift_Mime_SimpleMessage $message, $status, $templateID, $language)
    {
        // Check Message
        if (null === $message->getId() || empty($message->getId())) {
            return false;
        }

        // Create Log
        $class = $this->bag->get('pd_mailer.mail_log_class');
        $this->log = new $class;
        $this->log->setMailId($message->getId());
        $this->log->setFrom($message->getFrom());
        $this->log->setTo($message->getTo());
        $this->log->setSubject($message->getSubject());
        $this->log->setBody($message->getBody());
        $this->log->setContentType($message->getContentType());
        $this->log->setDate($message->getDate());
        $this->log->setHeader($message->getHeaders()->toString());
        $this->log->setReplyTo($message->getReplyTo());
        $this->log->setStatus($status);
        $this->log->setTemplateId($templateID);
        $this->log->setLanguage($language);

        // Save
        $this->entityManager->persist($this->log);
        $this->entityManager->flush();

        return true;
    }
private function logCreate(\Swift_Mime_SimpleMessage $message, $status, $templateID, $language)
    {
        // Check Message
        if (null === $message->getId() || empty($message->getId())) {
            return false;
        }

        // Create Log
        $class = $this->bag->get('pd_mailer.mail_log_class');
        $this->log = new $class;
        $this->log->setMailId($message->getId());
        $this->log->setFrom($message->getFrom());
        $this->log->setTo($message->getTo());
        $this->log->setSubject($message->getSubject());
        $this->log->setBody($message->getBody());
        $this->log->setContentType($message->getContentType());
        $this->log->setDate($message->getDate());
        $this->log->setHeader($message->getHeaders()->toString());
        $this->log->setReplyTo($message->getReplyTo());
        $this->log->setStatus($status);
        $this->log->setTemplateId($templateID);
        $this->log->setLanguage($language);

        // Save
        $this->entityManager->persist($this->log);
        $this->entityManager->flush();

        return true;
    }
private function logCreate ( \ Swift_Mime_SimpleMessage $ message , $ status , $ templateID , $ language ) { // Check Message if ( null === $ message -> getId ( ) || empty ( $ message -> getId ( ) ) ) { return false ; } // Create Log $ class = $ this -> bag -> get ( 'pd_mailer.mail_log_class' ) ; $ this -> log = new $ class ; $ this -> log -> setMailId ( $ message -> getId ( ) ) ; $ this -> log -> setFrom ( $ message -> getFrom ( ) ) ; $ this -> log -> setTo ( $ message -> getTo ( ) ) ; $ this -> log -> setSubject ( $ message -> getSubject ( ) ) ; $ this -> log -> setBody ( $ message -> getBody ( ) ) ; $ this -> log -> setContentType ( $ message -> getContentType ( ) ) ; $ this -> log -> setDate ( $ message -> getDate ( ) ) ; $ this -> log -> setHeader ( $ message -> getHeaders ( ) -> toString ( ) ) ; $ this -> log -> setReplyTo ( $ message -> getReplyTo ( ) ) ; $ this -> log -> setStatus ( $ status ) ; $ this -> log -> setTemplateId ( $ templateID ) ; $ this -> log -> setLanguage ( $ language ) ; // Save $ this -> entityManager -> persist ( $ this -> log ) ; $ this -> entityManager -> flush ( ) ; return true ; }
Create Mail Log.

@param \Swift_Mime_SimpleMessage $message
@param $status
@param $templateID
@param $language

@return bool
Create Mail Log .