Changeset 5369 in subversion for trunk/roundcubemail/program/steps/mail/sendmail.inc
- Timestamp:
- Oct 26, 2011 9:53:30 AM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/steps/mail/sendmail.inc
r5302 r5369 160 160 // address in brackets without name (do nothing) 161 161 if (preg_match('/^<'.$email_regexp.'>$/', $item)) { 162 $item = rcube_idn_to_ascii( $item);163 $result[] = $item;162 $item = rcube_idn_to_ascii(trim($item, '<>')); 163 $result[] = '<' . $item . '>'; 164 164 // address without brackets and without name (add brackets) 165 165 } else if (preg_match('/^'.$email_regexp.'$/', $item)) { 166 166 $item = rcube_idn_to_ascii($item); 167 $result[] = '<' .$item.'>';167 $result[] = '<' . $item . '>'; 168 168 // address with name (handle name) 169 } else if (preg_match('/ '.$email_regexp.'>*$/', $item, $matches)) {169 } else if (preg_match('/<*'.$email_regexp.'>*$/', $item, $matches)) { 170 170 $address = $matches[0]; 171 171 $name = str_replace($address, '', $item); … … 175 175 $name = '"'.addcslashes($name, '"').'"'; 176 176 } 177 $address = rcube_idn_to_ascii($address); 178 if (!preg_match('/^<'.$email_regexp.'>$/', $address)) 179 $address = '<'.$address.'>'; 177 $address = rcube_idn_to_ascii(trim($address, '<>')); 178 $address = '<' . $address . '>'; 180 179 181 180 $result[] = $name.' '.$address;
Note: See TracChangeset
for help on using the changeset viewer.
