diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2012-10-22 14:21:14 +0200 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2012-10-22 14:21:14 +0200 |
commit | e6a074715539e0e668665a8867a1a504edfb1bb8 (patch) | |
tree | 7ad3d3591bafd7f931b322cb7f68c28fd257110c /program | |
parent | bc615988fea001a6fab97127c95056fa7904cc6e (diff) |
Convert all identity headers into the desired message charset
Diffstat (limited to 'program')
-rw-r--r-- | program/steps/mail/sendmail.inc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index 70a6feb96..751af0694 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -72,13 +72,18 @@ function rcmail_encrypt_header($what) // get identity record function rcmail_get_identity($id) { - global $RCMAIL, $OUTPUT; + 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, $OUTPUT->get_charset())); + $out['string'] = format_email_recipient($sql_arr['email'], $sql_arr['name']); return $out; } |