summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2012-10-22 14:21:14 +0200
committerThomas Bruederli <thomas@roundcube.net>2012-10-22 14:33:34 +0200
commite92a89d2c29b6591a04992902e85206e4845085d (patch)
tree324559e4b40dd7b2835840f843120aeeb48f64cd /program
parente29922bb549251ca7a481e1f816619e66bc35d22 (diff)
Convert all identity headers into the desired message charset
Diffstat (limited to 'program')
-rw-r--r--program/steps/mail/sendmail.inc11
1 files changed, 8 insertions, 3 deletions
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index e2dd3429b..6b5dcbcc9 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -75,13 +75,18 @@ function rcmail_encrypt_header($what)
// get identity record
function rcmail_get_identity($id)
{
- global $RCMAIL;
+ global $RCMAIL, $message_charset;
if ($sql_arr = $RCMAIL->user->get_identity($id)) {
$out = $sql_arr;
+
+ if ($message_charset != RCMAIL_CHARSET) {
+ foreach ($out as $k => $v)
+ $out[$k] = rcube_charset_convert($v, RCMAIL_CHARSET, $message_charset);
+ }
+
$out['mailto'] = $sql_arr['email'];
- $out['string'] = format_email_recipient($sql_arr['email'],
- rcube_charset_convert($sql_arr['name'], RCMAIL_CHARSET, $RCMAIL->output->get_charset()));
+ $out['string'] = format_email_recipient($sql_arr['email'], $sql_arr['name']);
return $out;
}