$aData = sqimap_run_command_list ($imap_stream, $query, false, $response, $message, TRUE);
/* fallback to default charset */
if ($response == 'NO') {
- if (strpos($message,'[BADCHARSET]') !== false ||
+ if (strpos($message,'BADCHARSET') !== false ||
strpos($message,'character') !== false) {
sqm_trigger_imap_error('SQM_IMAP_BADCHARSET',$query, $response, $message);
$query = "SORT ($sSortField) US-ASCII $search";
/* fallback to default charset */
if ($response == 'NO') {
- if (strpos($message,'[BADCHARSET]') !== false ||
+ if (strpos($message,'BADCHARSET') !== false ||
strpos($message,'character') !== false) {
sqm_trigger_imap_error('SQM_IMAP_BADCHARSET',$query, $response, $message);
$query = "THREAD $sort_type US-ASCII $search";