Changeset 5188
- Timestamp:
- 04/06/2007 02:57:46 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/wp-mail.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-mail.php
r5089 r5188 25 25 $content = ''; 26 26 $content_type = ''; 27 $content_transfer_encoding = ''; 27 28 $boundary = ''; 28 29 $bodysignal = 0; 29 $dmonths = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 30 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); 30 $dmonths = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); 31 31 foreach ($message as $line) : 32 32 if (strlen($line) < 3) $bodysignal = 1; … … 40 40 $content_type = explode(';', $content_type); 41 41 $content_type = $content_type[0]; 42 } 43 if (preg_match('/Content-Transfer-Encoding: /i', $line)) { 44 $content_transfer_encoding = trim($line); 45 $content_transfer_encoding = substr($content_transfer_encoding, 27, strlen($content_transfer_encoding)-14); 46 $content_transfer_encoding = explode(';', $content_transfer_encoding); 47 $content_transfer_encoding = $content_transfer_encoding[0]; 42 48 } 43 49 if (($content_type == 'multipart/alternative') && (preg_match('/boundary="/', $line)) && ($boundary == '')) { … … 112 118 } 113 119 $content = trim($content); 120 121 if (stripos($content_transfer_encoding, "quoted-printable") !== false) { 122 $content = quoted_printable_decode($content); 123 } 124 114 125 // Captures any text in the body after $phone_delim as the body 115 126 $content = explode($phone_delim, $content); 116 127 $content[1] ? $content = $content[1] : $content = $content[0]; 117 128 118 echo "<p><b>Content-type:</b> $content_type, <b> boundary:</b> $boundary</p>\n";129 echo "<p><b>Content-type:</b> $content_type, <b>Content-Transfer-Encoding:</b> $content_transfer_encoding, <b>boundary:</b> $boundary</p>\n"; 119 130 echo "<p><b>Raw content:</b><br /><pre>".$content.'</pre></p>'; 120 131
Note: See TracChangeset
for help on using the changeset viewer.