src/Dispatcher.php
/**
     * Dispatches email.
     *
     * @param WordPressMailParams $params
     * @return bool
     */
Dispatches email.
@param WordPressMailParams $params
@return bool
Dispatches email . @param WordPressMailParams $params @return bool
public function dispatch(WordPressMailParams $params): bool
    {
        $this->params = apply_filters('rumur/wp-mailer/email_params', $params, $this);
        if (null === $this->params->to) {
            return false;
        }
        $this->setHelperActionsBeforeSend();
        $this->isSent = wp_mail(
            $this->params->to,
            $this->params->subject,
            $this->params->body,
            $this->params->headers,
            $this->params->attachments
        );
        $this->performSuccessAction()
            ->removeHelperActionsAfterSend();
        do_action('rumur/wp-mailer/dispatched', $params, $this);
        return $this->isSent;
    }
public function dispatch ( WordPressMailParams $ params ) : bool { $ this -> params = apply_filters ( 'rumur/wp-mailer/email_params' , $ params , $ this ) ; if ( null === $ this -> params -> to ) { return false ; } $ this -> setHelperActionsBeforeSend ( ) ; $ this -> isSent = wp_mail ( $ this -> params -> to , $ this -> params -> subject , $ this -> params -> body , $ this -> params -> headers , $ this -> params -> attachments ) ; $ this -> performSuccessAction ( ) -> removeHelperActionsAfterSend ( ) ; do_action ( 'rumur/wp-mailer/dispatched' , $ params , $ this ) ; return $ this -> isSent ; }
Dispatches email.
Dispatches email .
/**
         * @var WordPressMailParams $params
         *
         * @var Dispatcher $dispatcher
         *
         * @return WordPressMailParams
         */ /**
         * Double check if `to` recipient was not corrupted.
         */ /**
         * @var WordPressMailParams $params;
         * @var Dispatcher $dispatcher;
         */