|
@@ 140-151 (lines=12) @@
|
| 137 |
|
* |
| 138 |
|
* @return mixed |
| 139 |
|
*/ |
| 140 |
|
public function addToRecipient($address, $variables = null) |
| 141 |
|
{ |
| 142 |
|
if ($this->counters['recipients']['to'] > Api::RECIPIENT_COUNT_LIMIT) { |
| 143 |
|
throw new TooManyParameters(ExceptionMessages::TOO_MANY_PARAMETERS_RECIPIENT); |
| 144 |
|
} |
| 145 |
|
|
| 146 |
|
$variables = is_array($variables) ? $variables : []; |
| 147 |
|
|
| 148 |
|
$this->addRecipient('to', $address, $variables); |
| 149 |
|
|
| 150 |
|
return end($this->message['to']); |
| 151 |
|
} |
| 152 |
|
|
| 153 |
|
/** |
| 154 |
|
* @param string $address |
|
@@ 161-172 (lines=12) @@
|
| 158 |
|
* |
| 159 |
|
* @return mixed |
| 160 |
|
*/ |
| 161 |
|
public function addCcRecipient($address, $variables = null) |
| 162 |
|
{ |
| 163 |
|
if ($this->counters['recipients']['cc'] > Api::RECIPIENT_COUNT_LIMIT) { |
| 164 |
|
throw new TooManyParameters(ExceptionMessages::TOO_MANY_PARAMETERS_RECIPIENT); |
| 165 |
|
} |
| 166 |
|
|
| 167 |
|
$variables = is_array($variables) ? $variables : []; |
| 168 |
|
|
| 169 |
|
$this->addRecipient('cc', $address, $variables); |
| 170 |
|
|
| 171 |
|
return end($this->message['cc']); |
| 172 |
|
} |
| 173 |
|
|
| 174 |
|
/** |
| 175 |
|
* @param string $address |
|
@@ 182-193 (lines=12) @@
|
| 179 |
|
* |
| 180 |
|
* @return mixed |
| 181 |
|
*/ |
| 182 |
|
public function addBccRecipient($address, $variables = null) |
| 183 |
|
{ |
| 184 |
|
if ($this->counters['recipients']['bcc'] > Api::RECIPIENT_COUNT_LIMIT) { |
| 185 |
|
throw new TooManyParameters(ExceptionMessages::TOO_MANY_PARAMETERS_RECIPIENT); |
| 186 |
|
} |
| 187 |
|
|
| 188 |
|
$variables = is_array($variables) ? $variables : []; |
| 189 |
|
|
| 190 |
|
$this->addRecipient('bcc', $address, $variables); |
| 191 |
|
|
| 192 |
|
return end($this->message['bcc']); |
| 193 |
|
} |
| 194 |
|
|
| 195 |
|
/** |
| 196 |
|
* @param string $address |