if ($count > 1
) { // Multipart message; create new MIME object and boundary
$mime =
new Zend_Mime($this->_mail->
getMimeBoundary());
$boundary =
$mime->
boundary();
} elseif ($this->_isMultipart
) { // multipart/alternative -- grab boundary
$boundary =
$this->_parts
[0
]->boundary;
} // Determine recipients, and prepare headers
$this->recipients =
implode(',',
$mail->
getRecipients());
$this->
_prepareHeaders($this->
_getHeaders($boundary));
// Create message body
// This is done so that the same Zend_Mail object can be used in
// multiple transports
$message =
new Zend_Mime_Message();
$message->
setParts($this->_parts
);
$message->
setMime($mime);
$this->body =
$message->
generateMessage($this->EOL
);
// Send to transport!
$this->
_sendMail();
}