public static function start_phpmailer_redirection() {
        if (self::$phpmailersink) {
            // If an existing mailer sink is active, just clear it.
            self::$phpmailersink->clear();
        } else {
            self::$phpmailersink = new phpunit_phpmailer_sink();
        }
        return self::$phpmailersink;
    }
public static function start_phpmailer_redirection() {
        if (self::$phpmailersink) {
            // If an existing mailer sink is active, just clear it.
            self::$phpmailersink->clear();
        } else {
            self::$phpmailersink = new phpunit_phpmailer_sink();
        }
        return self::$phpmailersink;
    }
public static function start_phpmailer_redirection ( ) { if ( self :: $ phpmailersink ) { // If an existing mailer sink is active, just clear it. self :: $ phpmailersink -> clear ( ) ; } else { self :: $ phpmailersink = new phpunit_phpmailer_sink ( ) ; } return self :: $ phpmailersink ; }
Start phpmailer redirection.

Note: Do not call directly from tests,
use $sink = $this->redirectEmails() instead.

@return phpunit_phpmailer_sink
Start phpmailer redirection .