Mailgun\Messages\MessageBuilder::addBccRecipient PHP Method

addBccRecipient() public method

public addBccRecipient ( string $address, array | null $variables = null ) : mixed
$address string
$variables array | null
return mixed
    public function addBccRecipient($address, $variables = null)
    {
        if ($this->counters['recipients']['bcc'] > Api::RECIPIENT_COUNT_LIMIT) {
            throw new TooManyParameters(ExceptionMessages::TOO_MANY_PARAMETERS_RECIPIENT);
        }
        $this->addRecipient('bcc', $address, $variables);
        return end($this->message['bcc']);
    }

Usage Example

示例#1
0
 /**
  * Add a blind carbon copy to the message.
  *
  * @param string|array $address
  * @param string       $name
  * @param array        $variables
  *
  * @return \Bogardo\Mailgun\Mail\Message
  */
 public function bcc($address, $name = "", array $variables = [])
 {
     if (!empty($variables)) {
         $this->variables[$address] = $variables;
     }
     $this->messageBuilder->addBccRecipient($address, ['full_name' => $name]);
     return $this;
 }
All Usage Examples Of Mailgun\Messages\MessageBuilder::addBccRecipient