Add the sender email address to a Mail object

@param string|From $email Email address or From object
@param string|null $name  Sender name

@throws TypeException
331924
public function setFrom($email, $name = null)
    {
        if ($email instanceof From) {
            $this->from = $email;
        } else {

            if (
                is_string($email) && filter_var($email, FILTER_VALIDATE_EMAIL)
            ) {
                $this->from = new From($email, $name);
            } else {
                throw new TypeException(
                    '$email must be valid and of type string.'
                );
            }

        }
        return;
    }
431404
public function addRecipient ($email, $name = null, $details = array ())
    {

        // Add email and name to details

        $details['email']       = $email;
        $details['name']        = $name;

        // Add the recipient

        $this->_recipients[]    = $details;

    }
9568
public function cc( $email, $name = null ) 
	{	
		if ( !is_array( $email ) ) 
		{
			$email = array( $email => $name );
		}
		
		foreach( $email as $address => $name )
		{
			if ( is_numeric( $address ) && is_string( $name ) )
			{
				$this->cc[$name] = null;
			}
			else
			{
				$this->cc[$address] = $name;
			}
		}
		
		return $this;
	}
189259
public function setSender(
        $name,
        $email = null,
        $areaCode = null,
        $number = null,
        $documentType = null,
        $documentValue = null
    ) {
        $param = $name;
        if (is_array($param)) {
            $this->sender = new PagSeguroSender($param);
        } elseif ($param instanceof PagSeguroSender) {
            $this->sender = $param;
        } else {
            $sender = new PagSeguroSender();
            $sender->setName($param);
            $sender->setEmail($email);
            $sender->setPhone(new PagSeguroPhone($areaCode, $number));
            $sender->addDocument($documentType, $documentValue);
            $this->sender = $sender;
        }
    }
1214156
public function add(string $email, string $name = null): void
    {
        $replyToRecipient = $this->make();
        $replyToRecipient->email = $email;
        if ($name !== null) {
            $replyToRecipient->name = $name;
        }
        $this->set($replyToRecipient);
    }
1221624
public function setFrom($email, $name = null)
    {
        return parent::setFrom(
            $this->parseDomainPlaceholderAsPiwikHostName($email),
            $name
        );
    }
72018
function addReceiver( $email, $name = false )
    {
        $this->Mail->addTo( new ezcMailAddress( $email, $name, $this->usedCharset() ) );
        $this->ReceiverElements[] = array( 'name' => $name,
                                           'email' => $email );
    }
695549
public function from($email, $name = '')
    {
        $value = $this->parseMail($this->filtreEmail($email), $this->filtreName($name));

        return $this->withHeader('from', $value);
    }
512529
public function setReplyTo($email, $name = null)
    {
        return parent::setReplyTo(
            $this->parseDomainPlaceholderAsPiwikHostName($email),
            $name
        );
    }
699800
public function set_sender($email)
        {
            $parts = $this->parse_email($email);
            $this->from_user = $parts[0];
            $this->from_domain = $parts[1];
        }
220135
public function addCc( $email, $name = null )
	{
		$this->object->addCc( $email, $name );
		return $this;
	}
966670
public function setReplyTo($email, $name = null)
    {
        if (null !== $this->_replyTo) {
            /**
             * @see Zend_Mail_Exception
             */
            // require_once 'Zend/Mail/Exception.php';
            throw new Zend_Mail_Exception('Reply-To Header set twice');
        }

        $email = $this->_filterEmail($email);
        $name  = $this->_filterName($name);
        $this->_replyTo = $email;
        $this->_storeHeader('Reply-To', $this->_formatAddress($email, $name), true);

        return $this;
    }
758307
public function setFrom($email, $name = null)
    {
        if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
            throw new \Parable\Mail\Exception("Email provided is invalid: {$email}");
        }
        $this->addresses['from'] = [
            [
                'email' => $email,
                'name'  => $name,
            ]
        ];
        return $this;
    }
726976
public function to($email, $name = null)
    {
        if (strpos($email, ',') > 0) {
            $email = explode(',', $email);
            foreach ($email as $em) {
                $this->to[] = [$em, $name];
            }
        } else {
            $this->to[] = [$email, $name];
        }
    }
144554
function SetFrom($email,$name="")
	{
		if ($this->DecodeEntities)
		{
			$email = $this->DecodeEntities($email);
			$name = $this->DecodeEntities($name);
		}

		$this->From = new Recipient($email,$name);
	}
589939
public function from(string $email, string $name = null)
    {
        $this->mailer->setFrom($email, $name ?? '');
        return $this;
    }
1196014
public function add_reply_to($email, $name = null) {
		foreach ($this->reply_to as $reply_to) {
			if ($reply_to['email'] == $email) {
				return;
			}
		}

		$this->reply_to[] = [
			'name' => $name,
			'email' => strtolower($email),
		];
	}