- #1485499: make email address comparision case insensitive
- support multibyte characters in in_array_nocase()
| | |
| | | function in_array_nocase($needle, $haystack) |
| | | { |
| | | foreach ($haystack as $value) |
| | | if (strtolower($needle)===strtolower($value)) |
| | | if (rc_strtolower($needle)===rc_strtolower($value)) |
| | | return true; |
| | | |
| | | return false; |
| | |
| | | if (!empty($addr_part['mailto']) |
| | | && !in_array($addr_part['mailto'], $sa_recipients) |
| | | && (!$MESSAGE->compose_from |
| | | || !in_array($addr_part['mailto'], $MESSAGE->compose_from) |
| | | || !in_array_nocase($addr_part['mailto'], $MESSAGE->compose_from) |
| | | || count($to_addresses)==1)) // allow reply to yourself |
| | | { |
| | | $fvalue .= (strlen($fvalue) ? ', ':'').$addr_part['string']; |