projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More improvements in Italian translation.
[timetracker.git]
/
WEB-INF
/
lib
/
mail
/
Mailer.class.php
diff --git
a/WEB-INF/lib/mail/Mailer.class.php
b/WEB-INF/lib/mail/Mailer.class.php
index
6b301be
..
2d674ac
100644
(file)
--- a/
WEB-INF/lib/mail/Mailer.class.php
+++ b/
WEB-INF/lib/mail/Mailer.class.php
@@
-33,12
+33,13
@@
class Mailer {
var $mSender;
var $mReceiver;
var $mReceiverCC;
var $mSender;
var $mReceiver;
var $mReceiverCC;
+ var $mReceiverBCC;
function __construct($type='mail') {
$this->mMailMode = $type;
}
function __construct($type='mail') {
$this->mMailMode = $type;
}
- function set
SendTyp
e($value) {
+ function set
MailMod
e($value) {
$this->mMailMode = $value;
}
$this->mMailMode = $value;
}
@@
-58,6
+59,10
@@
class Mailer {
$this->mReceiverCC = $value;
}
$this->mReceiverCC = $value;
}
+ function setReceiverBCC($value) {
+ $this->mReceiverBCC = $value;
+ }
+
function setSender($value) {
$this->mSender = $value;
}
function setSender($value) {
$this->mSender = $value;
}
@@
-68,6
+73,7
@@
class Mailer {
$headers = array('From' => $this->mSender, 'To' => $this->mReceiver);
if (isset($this->mReceiverCC)) $headers = array_merge($headers, array('CC' => $this->mReceiverCC));
$headers = array('From' => $this->mSender, 'To' => $this->mReceiver);
if (isset($this->mReceiverCC)) $headers = array_merge($headers, array('CC' => $this->mReceiverCC));
+ if (isset($this->mReceiverBCC)) $headers = array_merge($headers, array('BCC' => $this->mReceiverBCC));
$headers = array_merge($headers, array(
'Subject' => $subject,
'MIME-Version' => '1.0',
$headers = array_merge($headers, array(
'Subject' => $subject,
'MIME-Version' => '1.0',
@@
-84,11
+90,15
@@
class Mailer {
break;
case 'smtp':
break;
case 'smtp':
- // Mail_smtp does not do CC
-> recipients conversion
+ // Mail_smtp does not do CC
or BCC -> recipients conversion.
if (!empty($this->mReceiverCC)) {
// make exactly one space after a comma
$recipients .= ', ' . preg_replace('/,[[:space:]]+/', ', ', $this->mReceiverCC);
}
if (!empty($this->mReceiverCC)) {
// make exactly one space after a comma
$recipients .= ', ' . preg_replace('/,[[:space:]]+/', ', ', $this->mReceiverCC);
}
+ if (!empty($this->mReceiverBCC)) {
+ // make exactly one space after a comma
+ $recipients .= ', ' . preg_replace('/,[[:space:]]+/', ', ', $this->mReceiverBCC);
+ }
$host = defined('MAIL_SMTP_HOST') ? MAIL_SMTP_HOST : 'localhost';
$port = defined('MAIL_SMTP_PORT') ? MAIL_SMTP_PORT : '25';
$host = defined('MAIL_SMTP_HOST') ? MAIL_SMTP_HOST : 'localhost';
$port = defined('MAIL_SMTP_PORT') ? MAIL_SMTP_PORT : '25';