ok i need to know how to pull the message from a eml file...i tried
<?php
function get_recipients($file) {
$fp = fopen($file, "rb");
$contents = fread($fp, filesize($file));
preg_match("/Message: (.*)\n/", $contents ,$to);
return(explode(", ", $to[1]));
}
$to = get_recipients("mail.eml");
$to2=reset($to);
echo $to2;
?>
but that didn't work any ideas? all help is appreciated