Add a recipient to the message.

@param string|array $address
@param string       $name
@param array        $variables

@return \Bogardo\Mailgun\Mail\Message
169141
public function to($address, $name = "", array $variables = [])
    {
        if (is_array($address)) {
            foreach ($address as $email => $variables) {
                $this->variables[$email] = $variables;

                $name = isset($variables['name']) ? $variables['name'] : null;
                $this->messageBuilder->addToRecipient($email, ['full_name' => $name]);
            }
        } else {
            if (!empty($variables)) {
                $this->variables[$address] = $variables;
            }
            $this->messageBuilder->addToRecipient($address, ['full_name' => $name]);
        }

        return $this;
    }
575808
public function bcc($address, $name = "", array $variables = [])
    {
        if (!empty($variables)) {
            $this->variables[$address] = $variables;
        }
        $this->messageBuilder->addBccRecipient($address, ['full_name' => $name]);

        return $this;
    }
831189
protected function _setEmail($varName, $email, $name)
    {
        if (!is_array($email)) {
            $this->_validateEmail($email, $varName);
            if ($name === null) {
                $name = $email;
            }
            $this->{$varName} = [$email => $name];

            return $this;
        }
        $list = [];
        foreach ($email as $key => $value) {
            if (is_int($key)) {
                $key = $value;
            }
            $this->_validateEmail($key, $varName);
            $list[$key] = $value;
        }
        $this->{$varName} = $list;

        return $this;
    }
1240515
public function addBcc($address, $name = null)
    {
        $current = $this->getBcc();
        $current[$address] = $name;

        return $this->setBcc($current);
    }
475602
public function from($address, $name = null)
    {
        $this->swift->setFrom($address, $name);

        return $this;
    }
302976
public function addMergeVar($recipient, $name, $content)
    {
        $this->mergeVars[] = array(
            'rcpt' => $recipient,
            'vars' => array(
                array(
                    'name' => $name,
                    'content' => $content
                )
            )
        );

        $this->setMerge(true);

        return $this;
    }
228480
public function to($mail, $name = null)
    {
        $this->mailer->addAddress($mail, $name);
        return $this;
    }
519311
public function addMailboxHeader($name, $addresses = null)
    {
        $this->storeHeader($name, $this->factory->createMailboxHeader($name, $addresses));
    }
655133
public function setFrom($address, $name = null)
	{
		$this->getComposer()->from = new ezcMailAddress($address, $name, CHARSET);

		return $this;
	}
1250098
public function addReplyTo($address, $name = null)
    {
        $current = $this->getReplyTo();
        $current[$address] = $name;

        return $this->setReplyTo($current);
    }
1372455
public function addToRecipient(string $address, array $variables = []): self
    {
        if ($this->counters['recipients']['to'] > self::RECIPIENT_COUNT_LIMIT) {
            throw TooManyRecipients::create('to');
        }
        $this->addRecipient('to', $address, $variables);

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

        return $this;
    }
685145
public function SetFrom($address, $name = '',$auto=1) {
    $address = trim($address);
    $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
    if (!self::ValidateAddress($address)) {
      $this->SetError($this->Lang('invalid_address').': '. $address);
      if ($this->exceptions) {
        throw new phpmailerException($this->Lang('invalid_address').': '.$address);
      }
      echo $this->Lang('invalid_address').': '.$address;
      return false;
    }
    $this->From = $address;
    $this->FromName = $name;
    if ($auto) {
      if (empty($this->ReplyTo)) {
        $this->AddAnAddress('ReplyTo', $address, $name);
      }
      if (empty($this->Sender)) {
        $this->Sender = $address;
      }
    }
    return true;
  }
575875
public function setReplyTo($address, $title = '')
    {
        $this->headers['Reply-To'] = $this->formatEmailAddress($address, $title);

        return $this;
    }
1032198
public function SetFrom($address, $name = '')
    {
        $address = trim($address);
        $name    = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
        if (!self::ValidateAddress($address)) {
            $this->SetError($this->Lang('invalid_address') . ': ' . $address);
            if ($this->exceptions) {
                throw new phpmailerException($this->Lang('invalid_address') . ': ' . $address);
            }
            echo $this->Lang('invalid_address') . ': ' . $address;
            return false;
        }
        $this->From     = $address;
        $this->FromName = $name;
        return true;
    }
1204665
public function alwaysTo(string $address, ?string $name = null): void
    {
        $this->getMailer()->alwaysTo($address, $name);
    }
517269
public function cc($address, $name = null, $override = false)
    {
        if ($override) {
            $this->swift->setCc($address, $name);

            return $this;
        }

        return $this->addAddresses($address, $name, 'Cc');
    }