protected function mergeTransportResult(ResultContract $transportResult, ResultContract $mailerResult)
    {
        if (!$mailerResult instanceof SendResult) {
            throw new InvalidArgumentException('mergeTransportResult can only merge Ems\Mail\SendResult');
        }

        $mailerResult->increment(count($transportResult));

        foreach ($transportResult->failures() as $i => $failed) {
            $mailerResult->addFailedRecipient($failed, $transportResult->error($i));
        }
    }
protected function mergeTransportResult(ResultContract $transportResult, ResultContract $mailerResult)
    {
        if (!$mailerResult instanceof SendResult) {
            throw new InvalidArgumentException('mergeTransportResult can only merge Ems\Mail\SendResult');
        }

        $mailerResult->increment(count($transportResult));

        foreach ($transportResult->failures() as $i => $failed) {
            $mailerResult->addFailedRecipient($failed, $transportResult->error($i));
        }
    }
protected function mergeTransportResult ( ResultContract $ transportResult , ResultContract $ mailerResult ) { if ( ! $ mailerResult instanceof SendResult ) { throw new InvalidArgumentException ( 'mergeTransportResult can only merge Ems\Mail\SendResult' ) ; } $ mailerResult -> increment ( count ( $ transportResult ) ) ; foreach ( $ transportResult -> failures ( ) as $ i => $ failed ) { $ mailerResult -> addFailedRecipient ( $ failed , $ transportResult -> error ( $ i ) ) ; } }
Merges the result of a transport send operation into a global one.

@param \Ems\Contracts\Mail\SendResult $transportResult
@param \Ems\Contracts\Mail\SendResult $mailerResult
Merges the result of a transport send operation into a global one .