Aleksander Machniak
2012-12-14 0f4e2f81342caed51709674c96ce5919cfc5913b
Remove brackets for recipients without name
1 files modified
4 ■■■■ changed files
program/steps/mail/sendmail.inc 4 ●●●● patch | view | raw | blame | history
program/steps/mail/sendmail.inc
@@ -219,11 +219,11 @@
    // 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];