you can upload the file in a zip archive.
try making the following changes.
change:
$MailBody = $MailBody . "<html><head><!-- In\"+\"stanceBegin template=\"/Templates/waue html body\" codeOutsideHTMLIsLocked=\"false\" --><!-- In\"+\"stanceBeginEditable name=\"emailhead\" --><!-- In\"+\"stanceBegin template=\"/Templates/waue html body\" codeOutsideHTMLIsLocked=\"false\" --><!-- In\"+\"stanceBeginEditable name=\"emailhead\" --><!-- In\"+\"stanceBegin template=\"/Templates/waue html body\" codeOutsideHTMLIsLocked=\"false\" --><!-- In\"+\"stanceBeginEditable name=\"emailhead\" --><!-- In\"+\"stanceBegin template=\"/Templates/waue html body\" codeOutsideHTMLIsLocked=\"false\" --><!-- In\"+\"stanceBeginEditable name=\"emailhead\" --><!-- In\"+\"stanceBegin template=\"/Templates/waue html body\" codeOutsideHTMLIsLocked=\"false\" --><!-- In\"+\"stanceBeginEditable name=\"emailhead\" --><!-- In\"+\"stanceEndEditable --><!-- In\"+\"stanceEndEditable --><!-- In\"+\"stanceEndEditable --><!-- In\"+\"stanceEndEditable --><!-- In\"+\"stanceEndEditable --></head><body><!-- In\"+\"stanceBeginEditable name=\"emailbody\" --><!-- In\"+\"stanceBeginEditable name=\"emailbody\" --><!-- In\"+\"stanceBeginEditable name=\"emailbody\" --><!-- In\"+\"stanceBeginEditable name=\"emailbody\" -->\r\n";
to:
$MailBody = $MailBody . "<html><head>\r\n";
delete this line:
$MailBody = $MailBody . " <!-- In\"+\"stanceBeginEditable name=\"emailbody\" -->\r\n";
and this line:
$MailBody = $MailBody . "<!-- In\"+\"stanceEndEditable -->\r\n";
and change:
$MailBody = $MailBody . "<!-- In\\\\\\\\\"+\\\\\\\\\"stanceEndEditable --><!-- In\\\\\\\\\"+\\\\\\\\\"stanceEndEditable --><!-- In\\\\\\\\\"+\\\\\\\\\"stanceEndEditable --><!-- In\\"+\\"stanceEndEditable --></body><!-- In\\\\\\\\\"+\\\\\\\\\"stanceEnd --><!-- In\\\\\\\\\"+\\\\\\\\\"stanceEnd --><!-- In\\\\\\\\\"+\\\\\\\\\"stanceEnd --><!-- In\\\\\\\\\"+\\\\\\\\\"stanceEnd --><!-- In\\"+\\"stanceEnd --></html>";
to:
$MailBody = $MailBody . "</body></html>";