| | |
| | | // if we're passed an array, assume addresses are valid and implode them before parsing. |
| | | if (is_array($recipients)) |
| | | $recipients = implode(', ', $recipients); |
| | | |
| | | |
| | | $addresses = array(); |
| | | $recipients = rcube_explode_quoted_string(',', $recipients); |
| | | |
| | | reset($recipients); |
| | | while (list($k, $recipient) = each($recipients)) |
| | | { |
| | | $a = explode(" ", $recipient); |
| | | $a = rcube_explode_quoted_string(' ', $recipient); |
| | | while (list($k2, $word) = each($a)) |
| | | { |
| | | if (strpos($word, "@") > 0 && $word[strlen($word)-1] != '"') |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | return $addresses; |
| | | } |
| | | |