OSDN Git Service

- replace Bare LF to CRLF. (thx: bobpp, sfio)
authorichii386 <ichii386@2ef88817-412d-0410-a32c-8029a115e976>
Thu, 19 Apr 2007 14:59:38 +0000 (14:59 +0000)
committerichii386 <ichii386@2ef88817-412d-0410-a32c-8029a115e976>
Thu, 19 Apr 2007 14:59:38 +0000 (14:59 +0000)
CHANGES
class/Ethna_MailSender.php

diff --git a/CHANGES b/CHANGES
index c2336f2..58e1c67 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -32,6 +32,7 @@
 - xmlrpc¤Î¥Ñ¥é¥á¡¼¥¿¤¬ActionForm¤ËÅϤäƤ¤¤Ê¤«¤Ã¤¿¤Î¤ò½¤Àµ(#9845)
 - file_type ¤Î¸¡ºº ¤¬µ¡Ç½¤·¤Ê¤¤ÌäÂê¤ò½¤Àµ
 - MailSender¤Ç¥Æ¥ó¥×¥ì¡¼¥È¥Õ¥¡¥¤¥ë¤ò»ØÄꤷ¤Ê¤¤¾ì¹ç¤ÎµóÆ°¤ò½¤Àµ
+- MailSender¤ÎBare LF¤òCRLF¤ËÃÖ´¹(#9898, ethna-users:0588)
 
 ** 2.3.1
 
index 7903366..eed5c2b 100644 (file)
@@ -199,6 +199,12 @@ class Ethna_MailSender
             $header_line .= $value[0] . ": " . $value[1];
         }
 
+        // ²þ¹Ô¥³¡¼¥É¤ò CRLF ¤Ë
+        if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
+            $body = str_replace("\n", "\r\n", $body);
+        }
+        $header_line = str_replace("\n", "\r\n", $header_line);
+
         // Á÷¿®
         foreach (to_array($to) as $rcpt) {
             if (is_string($this->option)) {