function mimemail_parse_boundary in Mime Mail 6
Same name and namespace in other branches
- 5 mimemail.inc \mimemail_parse_boundary()
- 7 includes/mimemail.incoming.inc \mimemail_parse_boundary()
1 call to mimemail_parse_boundary()
File
- ./
mimemail.inc, line 503 - Common mail functions for sending e-mail. Originally written by Gerhard.
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'],
);
}