Resolved!
Hi,
I've just worked out where to look for the php.
I did do a quick fix and it seems to be working.
As you can see I commented out in the headers section the "From:" and the "Reply-To:" definition, replacing them with just the address without the sender name (it was support@our_mail.com anyway).
I'm still not sure why it was doing it wrong for MS Exchange.
Could it be the trim at the very bottom?
/* Send email out after minor cleanups..*/
function sendmail($to, $subject, $message, $fromaddress,$fromname='', $xheaders = '') {
//TODO: provide an option to use SMTP server. Log all outgoing emails??
$eol="\n";
$fromname=$fromname?$fromname:$fromaddress;
//$fromname=$fromaddress;
//do some cleanup...avoid stupid errors.
$to=preg_replace("/(\r\n|\r|\n)/s",'', trim($to));
$subject=preg_replace("/(\r\n|\r|\n)/s",'', trim($subject));
$message = preg_replace("/(\r\n|\r)/s", "\n", trim($message));
#Headers
//$headers .= "From: ".$fromname."<".$fromaddress.">".$eol;
$headers .= "From: ".$fromaddress.$eol;
//$headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol;
$headers .= "Reply-To: ".$fromaddress.$eol;
$headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol;
$headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol;
$headers .= "X-Mailer: osTicket v 1.6".$eol;
if($xheaders) { //possibly attachments...does mess with content type
$headers .= $xheaders;
}else{
$headers .= "Content-Type: text/plain; charset=utf-8".$eol;
$headers .= "Content-Transfer-Encoding: 8bit".$eol;
}
//echo "';
mail($to,$subject,$message,trim($headers));
}