Set the identity that the email appears to be from (is sent on behalf of)

@param string $email
@param null|string $displayName
16417
public function setFrom(string $email, string $displayName = null) : void
    {
        $this->from = new Identity($email, $displayName);
    }
699800
public function set_sender($email)
        {
            $parts = $this->parse_email($email);
            $this->from_user = $parts[0];
            $this->from_domain = $parts[1];
        }
743697
public function setTo($email, $name)
    {
        $this->_to[] = $this->formatHeader((string) $email, (string) $name);
        return $this;
    }
1194077
protected function setIdentity()
    {
        $this->_id 					  = $this->_user->id;
        $this->setState('email', 		$this->_user->email);
        $this->setState('username', 	$this->_user->username);

        // TODO: Replace all instances of displayName with username
        $this->setState('displayName',  $this->_user->username);
        $this->setState('status', 		$this->_user->status);
        $this->setState('role', 		$this->_user->user_role);
        $this->setstate('apiKey',       $this->generateAPIKey());

        $this->errorCode = self::ERROR_NONE;

        return;
    }
1151789
public function setEmail($email)
	{
		if ( $email == $this->getEmail() ) { return; }

		if( $email !== '' && preg_match('/^.+@[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*$/', $email) !== 1 ) {
			throw new MShop_Exception( sprintf( 'Invalid characters in email address: "%1$s"', $email ) );
		}

		$this->_values['email'] = (string) $email;
		$this->setModified();
	}
259802
public function setCc($email)
    {
        if (is_string($email)) {
            $email = [ $email ];
        }

        if (!is_array($email)) {
            throw new InvalidArgumentException(
                'Must be an array of CC recipients.'
            );
        }

        $this->cc = [];

        // At this point, `$email` can be an _email array_ or an _array of emails_...
        if (isset($email['email'])) {
            // Means we're not dealing with multiple emails
            $this->addCc($email);
        } else {
            foreach ($email as $recipient) {
                $this->addCc($recipient);
            }
        }

        return $this;
    }
771528
public function setEmail($email)
    {
        $email = (string) $email;

        if ($this->exists() && $this->email !== $email) {
            $this->updated['email'] = true;
        }

        $this->email = $email;

        return $this;
    }
282047
function getFirstName($displayname=null) {
        if ( $displayname === null ) $displayname = $this->getNameAndEmail();
        if ( $displayname === null ) return null;
        $pieces = explode(' ',$displayname);
        if ( count($pieces) > 0 ) return $pieces[0];
        return null;
    }
344414
public function setDisplayName($name)
    {
        if (!is_null($name)) {
            $name = (string) $name;
        }

        $this->displayName = $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;
    }
1326785
public function setEmail(string $email): void
	{
		if (!Validators::isEmail($email)) {
			throw new InvalidArgumentException('Value is not valid email');
		}

		/* @var $repository UsersRepository */
		$repository = $this->getRepository();
		$user = $repository->getByEmail($email);
		if ($user !== null && $user !== $this) {
			throw new UniqueConstraintViolationException("Email '$email' exists");
		}
		$this->email = $email;
	}
962735
public function addTo($email, $name = null)
    {
        Argument::i()
            ->test(1, 'string')
            ->test(2, 'string', 'null');

        $this->to[$email] = $name;
        return $this;
    }
1358509
public function setFrom(string $email, string $name = null): self
	{
		$this->message->setFrom($email, $name);
		return $this;
	}
201638
public function setSender($email) {
    if (!$this->checkValidEmail($email)) {
      throw new \InvalidArgumentException(
          "Invalid sender: ". htmlspecialchars($email));
    }
    $this->message->setSender($email);
  }
1346216
public function getIdentify($email, $name = '', $properties = [])
    {
        if (!$email) {
            throw new InvalidArgumentException('E-mail cannot be empty or null');
        }

        //props that we will combine with default props
        $props = [
            PayloadProperties::EMAIL => Encryption::decode($email)
        ];

        if ($name) {
            $props[PayloadProperties::NAME] = $name;
        }

        if ($properties) {
            $props[PayloadProperties::PROPERTIES] = $properties;
        }

        return $this->getTrackPayload(ActionTypes::IDENTIFY, $props);
    }
564110
function setReplyTo( $email, $name = false )
    {
        $this->Mail->setHeader( 'Reply-To', new ezcMailAddress( $email, $name, $this->usedCharset() ) );
        $this->ReplyTo = array( 'name' => $name,
                                'email' => $email );
    }
1066486
public function setPrimaryName($primary) {
		if (is_string($primary) || is_array($primary)) {
			$this->primary = $primary;
			return;
		}
		
		throw new Exceptions\InvalidOption('Name of primary identity must be a string or an array, "' . gettype($primary) . '" was given');
	}