src/bundles/Mail/CCMail.php
public function send()
	{
		// load the mail configuration
		$config = \CCConfig::create( 'mail' );
		
		// when mailing is disabled do nothing just return
		if ( $config->disabled === true )
		{
			return;
		}
		
		// we cannot send a mail without recipients
		if ( empty( $this->to ) )
		{
			throw new Exception( "Cannot send mail without recipients." );
		}
		
		// is a catch all enabled?
		if ( $config->get( 'catch_all.enabled' ) === true )
		{
			// to be able to modify the mail without removing
			// the user options we have to clone the mail
			$mail = clone $this;
			
			// we have to remove all recipients ( to, ccc, bcc ) and set them
			// to our catch all recipients
			$mail->to = array();
			$mail->cc = array();
			$mail->bcc = array();
			
			$mail->to( $config->get( 'catch_all.addresses' ) );
			
			// transport the cloned mail
			return $mail->transport( $config->get( 'catch_all.transporter' ) );
		}
		
		// transport the mail
		$this->transport();
	}
public function send()
	{
		// load the mail configuration
		$config = \CCConfig::create( 'mail' );
		
		// when mailing is disabled do nothing just return
		if ( $config->disabled === true )
		{
			return;
		}
		
		// we cannot send a mail without recipients
		if ( empty( $this->to ) )
		{
			throw new Exception( "Cannot send mail without recipients." );
		}
		
		// is a catch all enabled?
		if ( $config->get( 'catch_all.enabled' ) === true )
		{
			// to be able to modify the mail without removing
			// the user options we have to clone the mail
			$mail = clone $this;
			
			// we have to remove all recipients ( to, ccc, bcc ) and set them
			// to our catch all recipients
			$mail->to = array();
			$mail->cc = array();
			$mail->bcc = array();
			
			$mail->to( $config->get( 'catch_all.addresses' ) );
			
			// transport the cloned mail
			return $mail->transport( $config->get( 'catch_all.transporter' ) );
		}
		
		// transport the mail
		$this->transport();
	}
public function send ( ) { // load the mail configuration $ config = \ CCConfig :: create ( 'mail' ) ; // when mailing is disabled do nothing just return if ( $ config -> disabled === true ) { return ; } // we cannot send a mail without recipients if ( empty ( $ this -> to ) ) { throw new Exception ( "Cannot send mail without recipients." ) ; } // is a catch all enabled? if ( $ config -> get ( 'catch_all.enabled' ) === true ) { // to be able to modify the mail without removing // the user options we have to clone the mail $ mail = clone $ this ; // we have to remove all recipients ( to, ccc, bcc ) and set them // to our catch all recipients $ mail -> to = array ( ) ; $ mail -> cc = array ( ) ; $ mail -> bcc = array ( ) ; $ mail -> to ( $ config -> get ( 'catch_all.addresses' ) ) ; // transport the cloned mail return $ mail -> transport ( $ config -> get ( 'catch_all.transporter' ) ) ; } // transport the mail $ this -> transport ( ) ; }
Prepare the message for sending to the transport

@return void
Prepare the message for sending to the transport