设置发件人

@param string|array $address
@param null         $name

@return $this
428242
public function from($address, $name = null)
    {
        $this->message->setFrom($address, $name);

        return $this;
    }
215502
protected function setAddress($address, $name = null, $property = 'to')
    {
        foreach ($this->addressesToArray($address, $name) as $recipient) {
            $recipient = $this->normalizeRecipient($recipient);

            $this->{$property}[] = [
                'name' => $recipient->name ?? null,
                'address' => $recipient->email,
            ];
        }

        return $this;
    }
806118
public function setAddress($address)
    {
        if (is_object($address)) {
            $this->address = $address;
        } elseif (is_string($address) || is_array($address)) {
            $this->address = new Address($address);
        }
    }
1116137
public function cc($address, $name = "", array $variables = [])
    {
        if (!empty($variables)) {
            $this->variables[$address] = $variables;
        }
        $this->messageBuilder->addCcRecipient($address, ['full_name' => $name]);

        return $this;
    }
1080063
public function addCc(string $address, ?string $name = null): Message
    {
        $this->cc[] = [
            'address' => $address,
            'name'    => $name
        ];

        return $this;
    }
1143783
public function update(string $address, array $parameters = [])
    {
        Assert::stringNotEmpty($address);
        Assert::isArray($parameters);

        foreach ($parameters as $field => $value) {
            switch ($field) {
                case 'address':
                case 'name':
                case 'description':
                    Assert::stringNotEmpty($value);

                    break;
                case 'access_level':
                    Assert::oneOf($value, ['readonly', 'members', 'everyone']);

                    break;
            }
        }

        $response = $this->httpPut(sprintf('/v3/lists/%s', $address), $parameters);

        return $this->hydrateResponse($response, UpdateResponse::class);
    }
1142124
public function address($email, $name = null)
    {
        $this->getMailer()->addAddress($email, (empty($name)) ? $email : $name);

        return $this;
    }
194977
public function bcc($address, $name = null, $override = false)
    {
        if ($override) {
            $this->swift->setBcc($address, $name);

            return $this;
        }

        return $this->addAddresses($address, $name, 'Bcc');
    }
1334547
public function cc($address, $name = null)
    {
        if ($this->arrayOfAddresses($address)) {
            $this->cc += $this->parseAddresses($address);
        } else {
            $this->cc[] = [$address, $name];
        }

        return $this;
    }
738410
public function bcc($address, $name = null)
    {
        if ($this->arrayOfAddresses($address)) {
            $this->bcc += $this->parseAddresses($address);
        } else {
            $this->bcc[] = [$address, $name];
        }

        return $this;
    }
699696
public function addFrom($address, $name = null)
    {
        $current = $this->getFrom();
        $current[$address] = $name;

        return $this->setFrom($current);
    }
922440
public function set($name, $value = null)
    {
        if (!is_array($name)) {
            $this->data[$name] = $value;
        } else {
            foreach ($name as $key => $value) {
                $this->data[$key] = $value;
            }
        }
        return $this;
    }
652861
public function setFrom($address, $name = '', $auto = true)
    {
        $address = trim($address);
        $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
        if (!$this->validateAddress($address)) {
            $this->setError($this->lang('invalid_address') . ': ' . $address);
            $this->edebug($this->lang('invalid_address') . ': ' . $address);
            if ($this->exceptions) {
                throw new Mail\MailerException($this->lang('invalid_address') . ': ' . $address);
            }
            return false;
        }
        $this->From = $address;
        $this->FromName = $name;
        if ($auto) {
            if (empty($this->Sender)) {
                $this->Sender = $address;
            }
        }
        return true;
    }
750815
protected function _addRecipient($type, $address, $name = null)
    {
        $classes = $this->_classes;
        $headers = $this->headers();
        if (!isset($headers[$type])) {
            $addresses = $classes['addresses'];
            $headers[$type] = new $addresses();
        }
        $class = $classes['address'];
        $value = new $class($address, $name);
        $headers[$type][] = $value;
        return $value;
    }
878802
public function cc($addresses, $name = null) {
        $this->message->setCc($addresses, $name);
        return $this;
    }
478674
public static function makeMasternodePauseInstance(string $address): self
    {
        $transaction = new self();

        $transaction->setVersion(Version::MASTERNODE_PAUSE);
        return self::setMasternodeCommandDefaults($address, $transaction);
    }
528733
public function setAddress($address)
    {
        if (null === $address) {
            $this->address = null;
        } elseif ('' == $address) {
            $this->address = '';
        } else {
            $this->assertValidAddress($address);
            $this->address = $address;
        }
        $this->setCachedValue(null);
    }