lib/classes/Swift/Transport/AbstractSmtpTransport.php
private function doMailTransaction($message, $reversePath, array $recipients, array &$failedRecipients)
    {
        $sent = 0;
        $this->doMailFromCommand($reversePath);
        foreach ($recipients as $forwardPath) {
            try {
                $this->doRcptToCommand($forwardPath);
                ++$sent;
            } catch (Swift_TransportException $e) {
                $failedRecipients[] = $forwardPath;
            } catch (Swift_AddressEncoderException $e) {
                $failedRecipients[] = $forwardPath;
            }
        }

        if (0 != $sent) {
            $sent += count($failedRecipients);
            $this->doDataCommand($failedRecipients);
            $sent -= count($failedRecipients);

            $this->streamMessage($message);
        } else {
            $this->reset();
        }

        return $sent;
    }
private function doMailTransaction($message, $reversePath, array $recipients, array &$failedRecipients)
    {
        $sent = 0;
        $this->doMailFromCommand($reversePath);
        foreach ($recipients as $forwardPath) {
            try {
                $this->doRcptToCommand($forwardPath);
                ++$sent;
            } catch (Swift_TransportException $e) {
                $failedRecipients[] = $forwardPath;
            } catch (Swift_AddressEncoderException $e) {
                $failedRecipients[] = $forwardPath;
            }
        }

        if (0 != $sent) {
            $sent += count($failedRecipients);
            $this->doDataCommand($failedRecipients);
            $sent -= count($failedRecipients);

            $this->streamMessage($message);
        } else {
            $this->reset();
        }

        return $sent;
    }
private function doMailTransaction ( $ message , $ reversePath , array $ recipients , array & $ failedRecipients ) { $ sent = 0 ; $ this -> doMailFromCommand ( $ reversePath ) ; foreach ( $ recipients as $ forwardPath ) { try { $ this -> doRcptToCommand ( $ forwardPath ) ; ++ $ sent ; } catch ( Swift_TransportException $ e ) { $ failedRecipients [ ] = $ forwardPath ; } catch ( Swift_AddressEncoderException $ e ) { $ failedRecipients [ ] = $ forwardPath ; } } if ( 0 != $ sent ) { $ sent += count ( $ failedRecipients ) ; $ this -> doDataCommand ( $ failedRecipients ) ; $ sent -= count ( $ failedRecipients ) ; $ this -> streamMessage ( $ message ) ; } else { $ this -> reset ( ) ; } return $ sent ; }
Send an email to the given recipients from the given reverse path
Send an email to the given recipients from the given reverse path