From 0f4e2f81342caed51709674c96ce5919cfc5913b Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 14 Dec 2012 12:38:42 +0100 Subject: Remove brackets for recipients without name --- program/steps/mail/sendmail.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'program/steps/mail/sendmail.inc') diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index d48834bb4..36d850f8f 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -219,11 +219,11 @@ function rcmail_email_input_format($mailto, $count=false, $check=true) // address in brackets without name (do nothing) if (preg_match('/^<'.$email_regexp.'>$/', $item)) { $item = rcube_idn_to_ascii(trim($item, '<>')); - $result[] = '<' . $item . '>'; + $result[] = $item; // address without brackets and without name (add brackets) } else if (preg_match('/^'.$email_regexp.'$/', $item)) { $item = rcube_idn_to_ascii($item); - $result[] = '<' . $item . '>'; + $result[] = $item; // address with name (handle name) } else if (preg_match('/<*'.$email_regexp.'>*$/', $item, $matches)) { $address = $matches[0]; -- cgit v1.2.3