Ticket #2460: 2460.diff
| File 2460.diff, 1.8 KB (added by , 20 years ago) |
|---|
-
wp-mail.php
24 24 25 25 $content = ''; 26 26 $content_type = ''; 27 $content_transfer_encoding = ''; 27 28 $boundary = ''; 28 29 $bodysignal = 0; 29 30 $dmonths = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', … … 40 41 $content_type = explode(';', $content_type); 41 42 $content_type = $content_type[0]; 42 43 } 44 if (preg_match('/Content-Transfer-Encoding: /i', $line)) { 45 $content_transfer_encoding = trim($line); 46 $content_transfer_encoding = substr($content_transfer_encoding, 27, strlen($content_transfer_encoding)-14); 47 $content_transfer_encoding = explode(';', $content_transfer_encoding); 48 $content_transfer_encoding = $content_transfer_encoding[0]; 49 } 43 50 if (($content_type == 'multipart/alternative') && (preg_match('/boundary="/', $line)) && ($boundary == '')) { 44 51 $boundary = trim($line); 45 52 $boundary = explode('"', $boundary); … … 111 118 $content = strip_tags($content[1], '<img><p><br><i><b><u><em><strong><strike><font><span><div>'); 112 119 } 113 120 $content = trim($content); 121 122 if (stristr($content_transfer_encoding, "quoted-printable") !== false) { 123 $content = quoted_printable_decode($content); 124 } 125 114 126 // Captures any text in the body after $phone_delim as the body 115 127 $content = explode($phone_delim, $content); 116 128 $content[1] ? $content = $content[1] : $content = $content[0]; 117 129 118 echo "<p><b>Content-type:</b> $content_type, <b> boundary:</b> $boundary</p>\n";130 echo "<p><b>Content-type:</b> $content_type, <b>Content-Transfer-Encoding:</b> $content_transfer_encoding, <b>boundary:</b> $boundary</p>\n"; 119 131 echo "<p><b>Raw content:</b><br /><pre>".$content.'</pre></p>'; 120 132 121 133 $content = trim($content);