src/SessionMailer.php
public function send(Message $mail) {
		$mails = array();
		if($this->sessionSection->offsetExists('sentMessages')) {
			$mails = $this->sessionSection->sentMessages;
		}

		if (count($mails) === $this->limit) {
			array_pop($mails);
		}

		// get message with generated html instead of set FileTemplate etc
		$reflectionMethod = $mail->getReflection()->getMethod('build');
		$reflectionMethod->setAccessible(TRUE);
		$builtMail = $reflectionMethod->invoke($mail);

		array_unshift($mails, $builtMail);

		$this->sessionSection->sentMessages = $mails;
	}
public function send(Message $mail) {
		$mails = array();
		if($this->sessionSection->offsetExists('sentMessages')) {
			$mails = $this->sessionSection->sentMessages;
		}

		if (count($mails) === $this->limit) {
			array_pop($mails);
		}

		// get message with generated html instead of set FileTemplate etc
		$reflectionMethod = $mail->getReflection()->getMethod('build');
		$reflectionMethod->setAccessible(TRUE);
		$builtMail = $reflectionMethod->invoke($mail);

		array_unshift($mails, $builtMail);

		$this->sessionSection->sentMessages = $mails;
	}
public function send ( Message $ mail ) { $ mails = array ( ) ; if ( $ this -> sessionSection -> offsetExists ( 'sentMessages' ) ) { $ mails = $ this -> sessionSection -> sentMessages ; } if ( count ( $ mails ) === $ this -> limit ) { array_pop ( $ mails ) ; } // get message with generated html instead of set FileTemplate etc $ reflectionMethod = $ mail -> getReflection ( ) -> getMethod ( 'build' ) ; $ reflectionMethod -> setAccessible ( TRUE ) ; $ builtMail = $ reflectionMethod -> invoke ( $ mail ) ; array_unshift ( $ mails , $ builtMail ) ; $ this -> sessionSection -> sentMessages = $ mails ; }
Sends given message via this mailer
@param Message $mail
Sends given message via this mailer