function mimemail_parse_boundary in Mime Mail 5
Same name and namespace in other branches
- 6 mimemail.inc \mimemail_parse_boundary()
- 7 includes/mimemail.incoming.inc \mimemail_parse_boundary()
1 call to mimemail_parse_boundary()
File
- ./
mimemail.inc, line 401
Code
function mimemail_parse_boundary($part) {
$m = array();
if (preg_match('/.*boundary="?([^";]+)"?.*/', $part['headers']['Content-Type'], $m)) {
$boundary = "\n--" . $m[1];
$body = str_replace("{$boundary}--", '', $part['body']);
return array_slice(explode($boundary, $body), 1);
}
return array(
$part['body'],
);
}