public function setFrom($from)
    {
        $recipients = $this->normalizeRecipients($from);

        //see RFC2822 3.6.2 'Originator fields' - multiple 'From' is allowed...
        foreach ($recipients as $email => $name) {
            $this->mailer->adapter->setFrom($email, $name);
            //...but anyway PHPMailer consideres it should be single 'From', so we stop processing array
            break;
        }

        return $this;
    }
public function setFrom($from)
    {
        $recipients = $this->normalizeRecipients($from);

        //see RFC2822 3.6.2 'Originator fields' - multiple 'From' is allowed...
        foreach ($recipients as $email => $name) {
            $this->mailer->adapter->setFrom($email, $name);
            //...but anyway PHPMailer consideres it should be single 'From', so we stop processing array
            break;
        }

        return $this;
    }
public function setFrom ( $ from ) { $ recipients = $ this -> normalizeRecipients ( $ from ) ; //see RFC2822 3.6.2 'Originator fields' - multiple 'From' is allowed... foreach ( $ recipients as $ email => $ name ) { $ this -> mailer -> adapter -> setFrom ( $ email , $ name ) ; //...but anyway PHPMailer consideres it should be single 'From', so we stop processing array break ; } return $ this ; }
Sets the message sender.
@param string|array $from sender email address.
You may pass an array of addresses if this message is from multiple people.
You may also specify sender name in addition to email address using format:
`[email => name]`.
@return static self reference.
Sets the message sender .