Set the From and FromName properties.

@param string $address
@param string $name
@param bool   $auto    Whether to also set the Sender address, defaults to true

@throws Exception

@return bool
772149
public function setFrom($address, $name = '', $auto = true)
    {
        $address = trim($address);
        $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
        // Don't validate now addresses with IDN. Will be done in send().
        $pos = strrpos($address, '@');
        if (false === $pos or
            (!$this->has8bitChars(substr($address, ++$pos)) or !static::idnSupported()) and
            !static::validateAddress($address)) {
            $error_message = sprintf('%s (From): %s',
                $this->lang('invalid_address'),
                $address);
            $this->setError($error_message);
            $this->edebug($error_message);
            if ($this->exceptions) {
                throw new Exception($error_message);
            }

            return false;
        }
        $this->From = $address;
        $this->FromName = $name;
        if ($auto) {
            if (empty($this->Sender)) {
                $this->Sender = $address;
            }
        }

        return true;
    }
325448
public function to($address, $name = null)
    {
        if (is_array($address)) {
            $this->addAddressArray($address, 'to');
        } else {
            $this->to[$address] = $name;
        }

        return $this;
    }
655133
public function setFrom($address, $name = null)
	{
		$this->getComposer()->from = new ezcMailAddress($address, $name, CHARSET);

		return $this;
	}
779884
public function setFrom($address, $title = '')
    {
        $this->headers['From'] = $this->formatEmailAddress($address, $title);

        return $this;
    }
1188360
public static function rangeFromBoundaries($from, $to)
    {
        $result = null;
        $invalid = false;
        foreach (array('from', 'to') as $param) {
            if (!($$param instanceof AddressInterface)) {
                $$param = (string) $$param;
                if ($$param === '') {
                    $$param = null;
                } else {
                    $$param = static::addressFromString($$param);
                    if ($$param === null) {
                        $invalid = true;
                    }
                }
            }
        }
        if ($invalid === false) {
            $result = static::rangeFromBoundaryAddresses($from, $to);
        }

        return $result;
    }
766786
public function addTo($address, $name = null)
	{
		$this->getComposer()->addTo(new ezcMailAddress($address, $name, CHARSET));

		return $this;
	}
1229489
public function from($address, $name = null)
    {
        if (is_array($address)) {
            $this->addAddressArray($address, 'from');
        } else {
            $this->from[$address] = $name;
        }

        return $this;
    }
953925
public function setFrom($fromEmail, $fromName = null)
    {
        $translator = $this->mailManager->getTranslator();

        $this->fromEmail = $translator->trans($fromEmail);
        if (null !== $fromName) {
            $this->fromName = $translator->trans($fromName);
        }

        return $this;
    }
1241523
protected function addAddresses($address, $name, $type)
    {
        if (is_array($address)) {
            $this->swift->{"set{$type}"}($address, $name);
        } else {
            $this->swift->{"add{$type}"}($address, $name);
        }

        return $this;
    }
51078
public function from($from, $name = null)
    {
        $this->from = ($name !== null) ? (ucwords($name) . " <{$from}>") : $from;

        return $this;
    }
517269
public function cc($address, $name = null, $override = false)
    {
        if ($override) {
            $this->swift->setCc($address, $name);

            return $this;
        }

        return $this->addAddresses($address, $name, 'Cc');
    }
395335
public void setAddressHeader(String name, Address addr) {
		if(logger.isDebugEnabled()) {
        	logger.debug("setAddressHeader - name=" + name + ", addr=" + addr);
        }
		checkCommitted();
		String hName = getFullHeaderName(name);

		if (logger.isDebugEnabled())
			logger.debug("Setting address header [" + name + "] to value ["
					+ addr + "]");

		if (isSystemHeaderAndNotGruu(getModifiableRule(hName), (Parameterable)addr.getURI())) {
			logger.error("Error, can't set system header [" + hName + "]");
			throw new IllegalArgumentException(
					"Cant set system header, it is maintained by container!!");
		}

		if (hName.equalsIgnoreCase("From") || hName.equalsIgnoreCase("To")) {
			logger.error("Error, can't set From or To header [" + hName + "]");
			throw new IllegalArgumentException(
					"Cant set From or To header, see JSR 289 Section 4.1.2");
		}

//		if (!isAddressTypeHeader(hName)) {
//			logger.error("Error, set header, its not address type header ["
//					+ hName + "]!!");
//			throw new IllegalArgumentException(
//					"This header is not address type header");
//		}
		Header h;
		String headerNameToAdd = getCorrectHeaderName(hName);
		try {
			h = SipFactoryImpl.headerFactory.createHeader(headerNameToAdd, addr
					.toString());
			this.message.setHeader(h);
		} catch (ParseException e) {
			logger.error("Parsing problem while setting address header with name "
					+ name + " and address "+ addr, e);
		}
	}
253886
protected void doSetFrom(String from, String personal) {
        assertArgumentNotEmpty("from", from);
        assertArgumentNotEmpty("personal", personal); // only from required
        postcard.setFrom(createAddress(from, personal));
    }
1144558
public function addCc($address, $name = null)
    {
        $current = $this->getCc();
        $current[$address] = $name;

        return $this->setCc($current);
    }
588595
public function from($name, $email)
    {
        $this->from_email = $email;
        $this->from_name = $name;

        return $this;
    }
658146
public function addMailboxHeader(string $name, $address)
    {
        return $this->add(new MailboxHeader($name, Address::create($address)));
    }
623428
public function setSender(string $address, ?string $name = null): Message
    {
        $this->sender = [
            'address' => $address,
            'name'    => $name
        ];

        return $this;
    }