Skip to content

Commit 7aa0d6c

Browse files
committed
Added the methods to set/add/get Cc and Bcc.
1 parent fae641e commit 7aa0d6c

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

lib/Cake/Network/CakeEmail.php

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,68 @@ public function getTo() {
254254
return $this->_to;
255255
}
256256

257+
/**
258+
* Set Cc
259+
*
260+
* @param mixed $email String with email, Array with email as key, name as value or email as value (without name)
261+
* @param string $name
262+
* @return void
263+
*/
264+
public function setCc($email, $name = null) {
265+
$this->_setEmail('_cc', $email, $name);
266+
}
267+
268+
/**
269+
* Add Cc
270+
*
271+
* @param mixed $email String with email, Array with email as key, name as value or email as value (without name)
272+
* @param string $name
273+
* @return void
274+
*/
275+
public function addCc($email, $name = null) {
276+
$this->_addEmail('_cc', $email, $name);
277+
}
278+
279+
/**
280+
* Get Cc
281+
*
282+
* @return array
283+
*/
284+
public function getCc() {
285+
return $this->_cc;
286+
}
287+
288+
/**
289+
* Set Bcc
290+
*
291+
* @param mixed $email String with email, Array with email as key, name as value or email as value (without name)
292+
* @param string $name
293+
* @return void
294+
*/
295+
public function setBcc($email, $name = null) {
296+
$this->_setEmail('_bcc', $email, $name);
297+
}
298+
299+
/**
300+
* Add Bcc
301+
*
302+
* @param mixed $email String with email, Array with email as key, name as value or email as value (without name)
303+
* @param string $name
304+
* @return void
305+
*/
306+
public function addBcc($email, $name = null) {
307+
$this->_addEmail('_bcc', $email, $name);
308+
}
309+
310+
/**
311+
* Get Bcc
312+
*
313+
* @return array
314+
*/
315+
public function getBcc() {
316+
return $this->_bcc;
317+
}
318+
257319
/**
258320
* Set email
259321
*

0 commit comments

Comments
 (0)