public function sendMessage(Horde_Mail_Rfc822_List $email, Horde_Mime_Headers $headers, Horde_Mime_Part $message)
{
$email = $this->_prepSendMessage($email, $message);
$opts = array();
if ($this->getMetadata('encrypt_sign')) {
/* Signing requires that the body not be altered in transport. */
$opts['encode'] = Horde_Mime_Part::ENCODE_7BIT;
}
/* Remove Bcc header if it exists. */
if (isset($headers['bcc'])) {
$headers = clone $headers;
unset($headers['bcc']);
}
try {
$message->send($email, $headers, $GLOBALS['injector']->getInstance('IMP_Mail'), $opts);
} catch (Horde_Mime_Exception $e) {
throw new IMP_Compose_Exception($e);
}
}