17.8. Controlling the MIME Boundary
Prev | Chapter 17. Zend_Mail | Next

## 17.8. Controlling the MIME Boundary

In a multipart message a MIME boundary for separating the different parts of the message is normally generated at random. In some cases, however, you might want to specify the MIME boundary that is used. This can be done using the `setMimeBoundary()` method, as in the following example:

Example 17.7. Changing the MIME Boundary

    <?php
    require_once 'Zend/Mail.php';
    $mail = new Zend_Mail();
    $mail->setMimeBoundary('=_' . md5(microtime(1) . $someId++);
    // build message...
    ?>

Prev | Up | Next
17.7. Adding Recipients | Home | 17.9. Additional Headers