public function send(Message $message)
    {
        $this->logger && $this->logger->debug('Set: a message will be sent');
        $this->message = $message;
        $this->connect()
            ->ehlo();

        if ($this->secure === 'tls' || $this->secure === 'tlsv1.0' || $this->secure === 'tlsv1.1' | $this->secure === 'tlsv1.2') {
            $this->starttls()
                ->ehlo();
        }

        if ($this->username !== null || $this->password !== null) {
            $this->authLogin();
        } elseif ($this->oauthToken !== null) {
            $this->authOAuthBearer();
        }
        $this->mailFrom()
            ->rcptTo()
            ->data()
            ->quit();
        return fclose($this->smtp);
    }
public function send(Message $message)
    {
        $this->logger && $this->logger->debug('Set: a message will be sent');
        $this->message = $message;
        $this->connect()
            ->ehlo();

        if ($this->secure === 'tls' || $this->secure === 'tlsv1.0' || $this->secure === 'tlsv1.1' | $this->secure === 'tlsv1.2') {
            $this->starttls()
                ->ehlo();
        }

        if ($this->username !== null || $this->password !== null) {
            $this->authLogin();
        } elseif ($this->oauthToken !== null) {
            $this->authOAuthBearer();
        }
        $this->mailFrom()
            ->rcptTo()
            ->data()
            ->quit();
        return fclose($this->smtp);
    }
public function send ( Message $ message ) { $ this -> logger && $ this -> logger -> debug ( 'Set: a message will be sent' ) ; $ this -> message = $ message ; $ this -> connect ( ) -> ehlo ( ) ; if ( $ this -> secure === 'tls' || $ this -> secure === 'tlsv1.0' || $ this -> secure === 'tlsv1.1' | $ this -> secure === 'tlsv1.2' ) { $ this -> starttls ( ) -> ehlo ( ) ; } if ( $ this -> username !== null || $ this -> password !== null ) { $ this -> authLogin ( ) ; } elseif ( $ this -> oauthToken !== null ) { $ this -> authOAuthBearer ( ) ; } $ this -> mailFrom ( ) -> rcptTo ( ) -> data ( ) -> quit ( ) ; return fclose ( $ this -> smtp ) ; }
Send the message

@param Message $message
@return bool
@throws CodeException
@throws CryptoException
@throws SMTPException
Send the message