protected function _prepSendMessage(Horde_Mail_Rfc822_List $email, $message = null)
{
/* Properly encode the addresses we're sending to. Always try
* charset of original message as we know that the user can handle
* that charset. */
try {
return $this->_prepSendMessageEncode($email, is_null($message) ? 'UTF-8' : $message->getHeaderCharset());
} catch (IMP_Compose_Exception $e) {
if (is_null($message)) {
throw $e;
}
}
/* Fallback to UTF-8 (if replying, original message might be in
* US-ASCII, for example, but To/Subject/Etc. may contain 8-bit
* characters. */
$message->setHeaderCharset('UTF-8');
return $this->_prepSendMessageEncode($email, 'UTF-8');
}