Checks whether a new email exists for a recipient or not.

@since 1.0.0

@access public
@param string $recipient The email address of a recipient.
962734
public function seeNewEmailFor( $recipient ) {
		$email = $this->grabLatestEmailFor( $recipient );
		$this->assertEquals( $recipient, $email['to_email'], 'The email recipient is wrong.' );
		$this->assertFalse( $email['is_read'], 'The email is already read.' );
	}
457356
public function isValidEmail(string $email): bool
    {
        return filter_var(filter_var($email, FILTER_SANITIZE_EMAIL), FILTER_VALIDATE_EMAIL) !== false;
    }
451268
public function addBCC( $email )
    {
        if ( is_array( $email ) )
        {
            $this->mailer->addBCC( $email[ 'email' ], $email[ 'name' ] );
        }
        else
        {
            $this->mailer->addBCC( $email );
        }
    }
607295
public function setEmail($email)
    {
        $validator = new EmailValidator();
        if ($validator->validate($email)) {
            $this->_email = $email;
        } else {
            $this->_email = false;
        }
    }
386531
public function addRecipient($recipient)
    {
        if (!is_string($recipient)) {
            throw new \Exception('Recipient is not string.');
        }

        try {
            $new = new EmailUser;
            $new->email = $recipient;

            $this->addRecipientUser($new);
        } catch (\Exception $e) {
            return false;
        }

        return true;
    }
676290
public function setEmail($email)
    {
        if (!is_string($email)) {
            $email = strval($email);
        }

        $this->email = $email;
    }
1137852
public function exists($email)
    {
        $this->setDefaultImage('404');

        $url = $this->buildGravatarURL($email);
        $headers = get_headers($url, 1);

        return substr($headers[0], 9, 3) == '200';
    }
279445
public function setReplyTo($email)
    {
        if ($this->isValidEmail($email) === true) {
            $this->reply_to = $email;
        } else {
            return false;
        }
    }
1342289
public function add_bcc($email, $name = null) {
		if ($this->addressee_exists($email, ['bcc'])) {
			return;
		}

		$this->recipients['bcc'][] = [
			'name' => $name,
			'email' => strtolower($email),
		];
	}
482704
public function hasBlocked(Model $recipient): bool
    {
        return $this->getFriendship($recipient)->status === Status::BLOCKED;
    }
558845
public function befriend(Model $recipient): bool
    {
        if ($this->isFriendsWith($recipient)) {
            return true;
        }

        $friendship = (new Friend())->forceFill([
            'recipient_id'   => $recipient->id,
            'recipient_type' => get_class($recipient),
            'status'         => Status::PENDING,
        ]);

        return (bool) $this->friends()->save($friendship);
    }
809963
public static function recipient($recipient) {
    if (is_string($recipient)) return $recipient;
    if (is_array($recipient)) return $recipient; // @TODO checks?
    
    throw new Exception('Unbekannter Parameter: '.Code::varInfo($recipient));
  }
865321
public function addRecipients($recipients)
    {
        try {
            if (is_array($recipients)) {
                foreach ($recipients as $recipientsOne) {
                    $this->addRecipient($recipientsOne);
                }
            } else {
                $this->addRecipient($recipientsOne);
            }
        } catch (\Exception $e) {
            return false;
        }

        return true;
    }
1260433
public function isEmailUnique($email)
    {
        $this->find("email", $email);
        if (isset($this->id)) {
            return false;
        }
        return true;
    }
1054306
private function addRecipient($recipientType, $recipientAddress, $recipientName = '')
    {
        if (filter_var($recipientAddress, FILTER_VALIDATE_EMAIL)) {
            $this->recipientList[$recipientType][] = array($recipientAddress, $recipientName);
        }
    }
915075
public function befriend(Model $recipient)
    {

        if (!$this->canBefriend($recipient)) {
            return false;
        }

        $friendship = (new Friendship)->fillRecipient($recipient)->fill([
            'status' => Status::PENDING,
        ]);

        $this->friends()->save($friendship);
      
        Event::fire('friendships.sent', [$this, $recipient]);

        return $friendship;

    }
1265594
public function process_envelope($recipient, $sender) {
        // Process the recipient address to retrieve the handler data.
        $this->process($recipient);

        // Validate the retrieved data against the e-mail address of the originator.
        $this->status = $this->validate($sender);

        return $this->status;
    }