Revision: 104
http://sourceforge.net/p/beeframework/code/104
Author: m_plomer
Date: 2013-10-31 11:37:35 +0000 (Thu, 31 Oct 2013)
Log Message:
-----------
- PhpMailerWrapper : added ccRecipients property
Modified Paths:
--------------
trunk/framework/Bee/Utils/PhpMailerWrapper.php
Modified: trunk/framework/Bee/Utils/PhpMailerWrapper.php
===================================================================
--- trunk/framework/Bee/Utils/PhpMailerWrapper.php 2013-10-15 17:29:38 UTC (rev 103)
+++ trunk/framework/Bee/Utils/PhpMailerWrapper.php 2013-10-31 11:37:35 UTC (rev 104)
@@ -76,6 +76,11 @@
private $mailType = 'mail';
/**
+ * @var array
+ */
+ private $ccRecipients = array();
+
+ /**
* Enter description here...
*
* @return string
@@ -264,6 +269,20 @@
$this->mailType = $mailType;
}
+ /**
+ * @param array $ccRecipients
+ */
+ public function setCcRecipients(array $ccRecipients) {
+ $this->ccRecipients = $ccRecipients;
+ }
+
+ /**
+ * @return array
+ */
+ public function getCcRecipients() {
+ return $this->ccRecipients;
+ }
+
protected function createMailer($sender, $recipient, $charSet = 'UTF-8', $html = true) {
$phpMailer = new PHPMailer(true);
$phpMailer->CharSet = $charSet;
@@ -319,6 +338,9 @@
throw new Exception('SmartyMailer failed: mailformed recipient. Type-mismatch. Recipient must be either string or array, but is: "' . gettype($recipient) . '" instead.');
}
+ foreach($this->ccRecipients as $ccRec) {
+ $phpMailer->addCC($ccRec);
+ }
// SET SENDER
if (!$sender) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|