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