<?xml version="1.0" encoding="UTF-8"?>
<!-- Reviewed: no -->
<sect1 id="zend.mail.html-mails">
    <title>HTML E-Mail</title>
    <para>
        To send an e-mail in HTML format, set the body using the method <code>setBodyHTML()</code> instead of
        <code>setBodyText()</code>. The MIME content type will automatically be set to <code>text/html</code>
        then. If you use both HTML and Text bodies, a multipart/alternative MIME message will automatically be
        generated:
    </para>
    <example id="zend.mail.html-mails.example-1">
        <title>Sending HTML E-Mail</title>
        <programlisting language="php"><![CDATA[
$mail = new Zend_Mail();
$mail->setBodyText('My Nice Test Text');
$mail->setBodyHtml('My Nice <b>Test</b> Text');
$mail->setFrom('somebody@example.com', 'Some Sender');
$mail->addTo('somebody_else@example.com', 'Some Recipient');
$mail->setSubject('TestSubject');
$mail->send();
]]></programlisting>
    </example>
</sect1>
<!--
vim:se ts=4 sw=4 et:
-->
