Removes a single recipient.

@param string $recipient

@return $this
332958
public function removeRecipient(string $recipient): self
    {
        $itemPosition = array_search($recipient, $this->recipients);

        if (false !== $itemPosition) {
            unset($this->recipients[$itemPosition]);
        }

        unset($this->recipientVariables[$recipient]);

        return $this;
    }
475605
def remove(self, transport):
        
        recipients = copy.copy(self.recipients)
        for address, recManager in recipients.items():
            recManager.remove(transport)
            if not len(recManager.transports):
                del self.recipients[address]
731049
public function send($recipients, $subject, $body, $sender)
    {
        $transport = \Swift_SmtpTransport::newInstance();
        $mailer = \Swift_Mailer::newInstance($transport);

        $message = \Swift_Message::newInstance($subject)
            ->setFrom($sender)
            ->setTo($recipients)
            ->setBody($body)
        ;

        $mailer->send($message);

        return $this;
    }
827425
public function remove($offset = null)
    {
        if ($offset === null) {
            $this->reset();

            return $this;
        }

        $arr = &$this->getArrayByReference($offset);

        if (is_array($arr) && array_key_exists($offset, $arr)) {
            unset($arr[$offset]);
        }

        return $this;
    }
1190554
protected function setPushableRecipient($recipientType, $recipient)
    {
        if ($recipientType === "device") {
            $this->recipientType = "device_iden";
            $this->recipient = $recipient;
        } else if ($recipientType === "channel") {
            $this->recipientType = "channel_tag";
            $this->recipient = $recipient;
        } else if ($recipientType === "email") {
            if (filter_var($recipient, FILTER_VALIDATE_EMAIL) !== false) {
                $this->recipientType = "email";
                $this->recipient = $recipient;
            } else {
                throw new Exceptions\InvalidRecipientException("Invalid email address.");
            }
        } else {
            throw new Exceptions\InvalidRecipientException("Unknown recipient type.");
        }
    }
91846
public function canBefriend($recipient)
    {
        // if user has Blocked the recipient and changed his mind
        // he can send a friend request after unblocking
        if ($this->hasBlocked($recipient)) {
            $this->unblockFriend($recipient);
            return true;
        }

        // if sender has a friendship with the recipient return false
        if ($friendship = $this->getFriendship($recipient)) {
            // if previous friendship was Denied then let the user send fr
            if ($friendship->status != Status::DENIED) {
                return false;
            }
        }
        return true;
    }
1013412
public function removeUsers($users)
    {
        if (is_array($users)) {
            foreach ($users as $id) {
                $this->users()->detach($id);
            }

            return $this;
        }

        $this->users()->detach($users);

        return $this;
    }
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;
    }
718552
public function blockFriend(Model $recipient)
    {
        // if there is a friendship between the two users and the sender is not blocked
        // by the recipient user then delete the friendship
        if (!$this->isBlockedBy($recipient)) {
            $this->findFriendship($recipient)->delete();
        }

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

        Event::fire('friendships.blocked', [$this, $recipient]);

        return $friendship;
    }
942539
public function removeClient(\Gpupo\CommonSchema\ORM\Entity\Application\API\OAuth\Client\Client $client)
    {
        return $this->clients->removeElement($client);
    }
956323
public function unsetHeader(string $header)
    {
        $header = static::normalizeHeader($header);
        unset($this->headers[$header]);
        return $this;
    }
551557
public function removeAttachment($attachment)
	{
		if (!($attachment instanceof Swift_Mime_MimeEntity))
		{
			$attachment = \Swift_Attachment::fromPath($attachment);
		}

		return $this->detach($attachment);
	}
909820
public static function from($sender = NULL) {
    if (!isset($sender) && ($sender = Config::get('mail.from')) == NULL) {
      $sender = 'www@'.PSC::getEnvironment()->getHostName();
    }
    return self::recipient($sender);
  }
471695
public function unfriend(Model $recipient)
    {
        $deleted = $this->findFriendship($recipient)->delete();

        Event::fire('friendships.cancelled', [$this, $recipient]);

        return $deleted;
    }
1153090
public function addRecipient($recipients, $prepend = false)
    {
        if (!$prepend) {
            $this->appendRecipient($recipients);
        } else {
            $this->prependRecipient($recipients);
        }

        return $this;
    }
173218
public function remove_from_all_drip_campaigns($recipient_address){
        $endpoint = "drip_campaigns/deactivate";

        $payload = array(
            "recipient_address" => $recipient_address
        );

        return $this->api_request($endpoint, self::HTTP_POST, $payload);
    }
1305158
public function setRecipient(string $recipient_mail, string $name = ''): Mailer
    {
        $this->recipient_emails[] = ['email' => $recipient_mail, 'name' => $name];

        return $this;
    }