protected function overwriteRecipientsIfNeeded(MessageContract $message)
    {
        if (!$overwrittenTo = $this->overwrittenTo()) {
            return;
        }

        $message->clearRecipientHeaders();

        foreach ($overwrittenTo as $to) {
            $message->to($to);
        }
    }
protected function overwriteRecipientsIfNeeded(MessageContract $message)
    {
        if (!$overwrittenTo = $this->overwrittenTo()) {
            return;
        }

        $message->clearRecipientHeaders();

        foreach ($overwrittenTo as $to) {
            $message->to($to);
        }
    }
protected function overwriteRecipientsIfNeeded ( MessageContract $ message ) { if ( ! $ overwrittenTo = $ this -> overwrittenTo ( ) ) { return ; } $ message -> clearRecipientHeaders ( ) ; foreach ( $ overwrittenTo as $ to ) { $ message -> to ( $ to ) ; } }
Clears all recipients of the mail and replaces them with
overwrittenTo if it was set.

@param Ems\Contracts\Mail\Message $message

@see self::alwaysSendTo
Clears all recipients of the mail and replaces them with overwrittenTo if it was set .