Set the To addresses.

Recipients set in this field will receive a copy of this message.

@param Address[] $addresses

@return self
423742
public function setTo(array $addresses): Email
    {
        $addresses = $this->transformAddressesToArray($addresses);
        $this->message->setTo($addresses);

        return $this;
    }
64624
protected function prepareListAccountAddress(array $addresses)
    {
        $prepared = array();

        foreach ($addresses as $address_id => $items) {
            $prepared[$address_id]['items'] = $items;
            $prepared[$address_id]['locked'] = !$this->address->canDelete($address_id);
        }

        return $prepared;
    }
529797
protected static function format_addresses($addresses)
	{
		$return = array();

		foreach ($addresses as $recipient)
		{
			$recipient['name'] and $recipient['email'] = '"'.$recipient['name'].'" <'.$recipient['email'].'>';
			$return[] = $recipient['email'];
		}

		return join(', ', $return);
	}
189694
private function createReplays($addresses) {
        if (is_array($addresses) && count($addresses) > 0) {
            foreach ($addresses as $address) {
                $this->mailer->addReplyTo($address);
            }
        } else if (!empty($addresses)) {
            $this->mailer->addReplyTo($addresses);
        }
    }
1125905
public function setReturnPath($address)
    {
        if (!$this->setHeaderFieldModel('Return-Path', $address)) {
            $this->getHeaders()->addPathHeader('Return-Path', $address);
        }

        return $this;
    }
50384
public function setMessages(array $messages)
    {
        foreach ($messages as $key => $message) {
            $this->setMessage($message, $key);
        }
        return $this;
    }
154330
public function addAddress(array $attributes)
    {
        $attributes = $this->loadAddressAttributes($attributes);

        return $this->addresses()->updateOrCreate($attributes);
    }
42797
public function setFromAddress(string $address, array $variables = []): self
    {
        $this->addRecipient('from', $address, $variables);

        return $this;
    }
1228238
public function setMacAddress(string $macAddress)
    {
        $this->macAddress = $macAddress;

        $this->raw = array_merge($this->raw, ['MacAddress' => $macAddress]);

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

        return $this;
    }
1156591
public static function createArray(array $addresses): array
    {
        $addrs = [];
        foreach ($addresses as $address) {
            $addrs[] = self::create($address);
        }

        return $addrs;
    }
838973
protected function setAddress(Address $address, $addressKey)
    {
        if (!$address->id) {
            $addressResource = $this->client
                ->addresses()
                ->create($address->asArray());

            if ($addressResource) {
                $address = $addressResource;
            }
        }

        $this->updateParams["{$addressKey}Id"] = $address->id;
    }
684856
public function setDeliveryAddressInfo(Address $address)
    {
        $this->setDeliveryAddress($address->getAddress());
        $this->setDeliveryPostalCode($address->getPostalCode());
        $this->setDeliveryCity($address->getCity());
        $this->setDeliveryState($address->getState());
        $this->setDeliveryCountry($address->getCountry());
    }
480469
public function deleteEmailAddress(array $addresses = []): bool
    {
        $this->getApi()->request($this->getApi()->sprintf('/user/emails'), Request::METHOD_DELETE, $addresses);

        if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
            return true;
        }

        return false;
    }
571939
public function updateAddress(Address $address, array $attributes)
    {
        $attributes = $this->loadAddressAttributes($attributes);

        return $address->fill($attributes)->save();
    }
895592
private function transformArrayToAddresses($addresses): array
    {
        $transformed = [];
        foreach ($addresses as $email => $name) {
            $address = new Address($email, $name);
            $transformed[] = $address;
        }

        return $transformed;
    }
1146057
public function setBcc(array $addresses): Email
    {
        $addresses = $this->transformAddressesToArray($addresses);
        $this->message->setBcc($addresses);

        return $this;
    }