summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
authorsvncommit <devs@roundcube.net>2006-07-31 22:07:45 +0000
committersvncommit <devs@roundcube.net>2006-07-31 22:07:45 +0000
commitabb32edbeb0e4c9be7b38c4162bd8c7cbd06dc74 (patch)
treee64827b5ad64c2603d6bf1c0120d1cb64377faf8 /program/steps/mail
parent7e93ff04a5c4de702bd014e01e4a0e96394aa668 (diff)
#1399714 - fixed commas in identity fullname field
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/sendmail.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index d0e0f784e..b48dc0cf5 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -53,8 +53,9 @@ function rcmail_get_identity($id)
{
$sql_arr = $DB->fetch_assoc($sql_result);
$out = $sql_arr;
+ $name = strpos($sql_arr['name'], ",") ? '"'.$sql_arr['name'].'"' : $sql_arr['name'];
$out['string'] = sprintf('%s <%s>',
- rcube_charset_convert($sql_arr['name'], $CHARSET, $OUTPUT->get_charset()),
+ rcube_charset_convert($name, $CHARSET, $OUTPUT->get_charset()),
$sql_arr['mailto']);
return $out;
}
@@ -87,7 +88,7 @@ $message_charset = isset($_POST['_charset']) ? $_POST['_charset'] : $input_chars
$mailto_regexp = array('/[,;]\s*[\r\n]+/', '/[\r\n]+/', '/[,;]\s*$/m');
$mailto_replace = array(', ', ', ', '');
-// repalce new lines and strip ending ', '
+// replace new lines and strip ending ', '
$mailto = preg_replace($mailto_regexp, $mailto_replace, get_input_value('_to', RCUBE_INPUT_POST, TRUE, $message_charset));
// decode address strings