yii\mail\BaseMailer::sendMultiple PHP Method

sendMultiple() public method

The default implementation simply calls BaseMailer::send multiple times. Child classes may override this method to implement more efficient way of sending multiple messages.
public sendMultiple ( array $messages ) : integer
$messages array list of email messages, which should be sent.
return integer number of messages that are successfully sent.
    public function sendMultiple(array $messages)
    {
        $successCount = 0;
        foreach ($messages as $message) {
            if ($this->send($message)) {
                $successCount++;
            }
        }
        return $successCount;
    }