--$mimeboundary
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: base64
$textbody
Content-Type: text/html; charset=ISO-8859-1
$htmlbody
--$mimeboundary--