src/Net/Mail/Transport/Default.php
public function send( $mail, $parameters = array() )
	{
		$body		= $mail->getBody();
		$headers	= $mail->getHeaders();
		$receiver	= $mail->getReceiver();
		$subject	= $mail->getSubject();

		//  --  VALIDATION & SECURITY CHECK  --  //
		$this->checkForInjection( $receiver );
		$this->checkForInjection( $subject );
		if( !$headers->hasField( 'From' ) )
			throw new InvalidArgumentException( 'No mail sender defined' );
		if( !$receiver )
			throw new InvalidArgumentException( 'No mail receiver defined' );
		if( !$subject )
			throw new InvalidArgumentException( 'No mail subject defined' );
		$subject	= "=?UTF-8?B?".base64_encode( $subject )."?=";

/*		foreach( $headers as $key => $value )
		{
			$this->checkForInjection( $key );
			$this->checkForInjection( $value );
		}
*/
		//  --  HEADERS  --  //
//		if( $this->mailer )
		$headers->setFieldPair( 'X-Mailer', $this->mailer, TRUE );
		$headers->setFieldPair( 'Date', date( 'r' ), TRUE );

		if( is_array( $parameters ) )
			$parameters	= implode( PHP_EOL, $parameters );

		if( !mail( $receiver, $subject, $body, $headers->toString(), $parameters ) )
			throw new RuntimeException( 'Mail could not been sent' );
	}
public function send( $mail, $parameters = array() )
	{
		$body		= $mail->getBody();
		$headers	= $mail->getHeaders();
		$receiver	= $mail->getReceiver();
		$subject	= $mail->getSubject();

		//  --  VALIDATION & SECURITY CHECK  --  //
		$this->checkForInjection( $receiver );
		$this->checkForInjection( $subject );
		if( !$headers->hasField( 'From' ) )
			throw new InvalidArgumentException( 'No mail sender defined' );
		if( !$receiver )
			throw new InvalidArgumentException( 'No mail receiver defined' );
		if( !$subject )
			throw new InvalidArgumentException( 'No mail subject defined' );
		$subject	= "=?UTF-8?B?".base64_encode( $subject )."?=";

/*		foreach( $headers as $key => $value )
		{
			$this->checkForInjection( $key );
			$this->checkForInjection( $value );
		}
*/
		//  --  HEADERS  --  //
//		if( $this->mailer )
		$headers->setFieldPair( 'X-Mailer', $this->mailer, TRUE );
		$headers->setFieldPair( 'Date', date( 'r' ), TRUE );

		if( is_array( $parameters ) )
			$parameters	= implode( PHP_EOL, $parameters );

		if( !mail( $receiver, $subject, $body, $headers->toString(), $parameters ) )
			throw new RuntimeException( 'Mail could not been sent' );
	}
public function send ( $ mail , $ parameters = array ( ) ) { $ body = $ mail -> getBody ( ) ; $ headers = $ mail -> getHeaders ( ) ; $ receiver = $ mail -> getReceiver ( ) ; $ subject = $ mail -> getSubject ( ) ; //  --  VALIDATION & SECURITY CHECK  --  // $ this -> checkForInjection ( $ receiver ) ; $ this -> checkForInjection ( $ subject ) ; if ( ! $ headers -> hasField ( 'From' ) ) throw new InvalidArgumentException ( 'No mail sender defined' ) ; if ( ! $ receiver ) throw new InvalidArgumentException ( 'No mail receiver defined' ) ; if ( ! $ subject ) throw new InvalidArgumentException ( 'No mail subject defined' ) ; $ subject = "=?UTF-8?B?" . base64_encode ( $ subject ) . "?=" ; /*		foreach( $headers as $key => $value )
		{
			$this->checkForInjection( $key );
			$this->checkForInjection( $value );
		}
*/ //  --  HEADERS  --  // //		if( $this->mailer ) $ headers -> setFieldPair ( 'X-Mailer' , $ this -> mailer , TRUE ) ; $ headers -> setFieldPair ( 'Date' , date ( 'r' ) , TRUE ) ; if ( is_array ( $ parameters ) ) $ parameters = implode ( PHP_EOL , $ parameters ) ; if ( ! mail ( $ receiver , $ subject , $ body , $ headers -> toString ( ) , $ parameters ) ) throw new RuntimeException ( 'Mail could not been sent' ) ; }
Sends Mail.
@access		public
@param		Net_Mail	$mail		Mail Object
@param		array		$parameters	Additional mail parameters
@return		void
@throws		RuntimeException|InvalidArgumentException
Sends Mail .