diff options
author | alecpl <alec@alec.pl> | 2009-03-31 14:47:22 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2009-03-31 14:47:22 +0000 |
commit | 5d110184c06f937d41fff3e0cc4d4d40314caf72 (patch) | |
tree | c6c2a48ca162e72c103390120155ecb0ad4b61c0 /program | |
parent | 38ddba5cdaf4ac22f9c5da979b09d398478d1763 (diff) |
- Fix using mail() on Windows (#1485779)
Diffstat (limited to 'program')
-rw-r--r-- | program/steps/mail/func.inc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index a76532cb9..f9d560a97 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -1308,7 +1308,14 @@ function rcmail_deliver_message(&$message, $from, $mailto) // reset stored headers and overwrite $message->_headers = array(); $header_str = $message->txtHeaders($headers_php); - + + // #1485779 + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + if (preg_match_all('/<([^@]+@[^>]+)>/', $headers_enc['To'], $m)) { + $headers_enc['To'] = implode(', ', $m[1]); + } + } + if (ini_get('safe_mode')) $sent = mail($headers_enc['To'], $headers_enc['Subject'], $msg_body, $header_str); else |