same exact error? or is it referencing a different line number?
try changing:
/Start Mail Body*/
$MailBody = $MailBody . " \r\n";
to:
/Start Mail Body*/
$MailBody = "";
$MailBody = $MailBody . " \r\n";
if you still have a problem, please post the error message, it may look like the same error, but the line number may be different.