look at the lines that do work, they are not using an echo, but instead, they are applying the text to the $MailBody variable:
$MailBody = $MailBody . date('D., M. jS', strtotime($edate));
you need to do the same with your if statement. instead of:
if ($bdate != $edate) { echo "does not match"; }
use:
if ($bdate != $edate) { $MailBody = $MailBody . "does not match"; }