1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/z-push_ynh.git synced 2024-09-03 18:05:58 +02:00
z-push_ynh/sources/testing/testing-mime-split.php
2014-12-18 18:08:26 +01:00

24 lines
No EOL
572 B
PHP

<?php
require_once('include/mimeDecode.php');
$mailtext = file_get_contents("testing/samples/messages/smime001.txt");
$decoder = new Mail_mimeDecode($mailtext);
$parts = $decoder->getSendArray();
if ($parts === false) {
printf("ERROR splitting message\n");
}
else {
list($recipents,$headers,$body) = $parts;
printf("RECIPIENTS\n");
print_r($recipents);
printf("\nHEADERS\n");
print_r($headers);
printf("\nBODY\n");
print_r($body);
printf("\n");
//$mail = Mail::factory('smtp');
//$mail->send($recipents,$headers,$body);
}
?>