|
|
|
@ -1602,10 +1602,14 @@ class rcube
|
|
|
|
|
// unset To,Subject headers because they will be added by the mail() function
|
|
|
|
|
$header_str = $this->message_head($message, array('To', 'Subject'));
|
|
|
|
|
|
|
|
|
|
if (is_array($mailto)) {
|
|
|
|
|
$mailto = implode(', ', $mailto);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// #1485779
|
|
|
|
|
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
|
|
|
|
|
if (preg_match_all('/<([^@]+@[^>]+)>/', $headers['To'], $m)) {
|
|
|
|
|
$headers['To'] = implode(', ', $m[1]);
|
|
|
|
|
if (preg_match_all('/<([^@]+@[^>]+)>/', $mailto, $m)) {
|
|
|
|
|
$mailto = implode(', ', $m[1]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1618,9 +1622,9 @@ class rcube
|
|
|
|
|
true, false);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
$delim = $this->config->header_delimiter();
|
|
|
|
|
$to = $headers['To'];
|
|
|
|
|
$subject = $headers['Subject'];
|
|
|
|
|
$delim = $this->config->header_delimiter();
|
|
|
|
|
$to = $mailto;
|
|
|
|
|
$subject = $headers['Subject'];
|
|
|
|
|
$header_str = rtrim($header_str);
|
|
|
|
|
|
|
|
|
|
if ($delim != "\r\n") {
|
|
|
|
|