Prerequisites
Describe the issue
Typing "has:attachment" in the search field can return different results than using the Type: With attachment UI filter. The latter uses the $HasAttachment/$HasNoAttachment keywords and produced better results (depending on IMAP server config) versus the former.
$HasAttachment used:
|
$ctypes = ['application/', 'multipart/mixed', 'multipart/signed', 'multipart/report']; |
|
|
|
// Build search string of "with attachment" filter |
|
$attachment = trim(str_repeat(' OR', count($ctypes))) . ' KEYWORD $HasAttachment'; |
|
foreach ($ctypes as $type) { |
|
$attachment .= ' HEADER Content-Type ' . rcube_imap_generic::escape($type); |
|
} |
|
$attachment .= ' NOT KEYWORD $HasNoAttachment'; |
$HasAttachment missing:
|
$ctypes = ['application/', 'multipart/mixed', 'multipart/signed', 'multipart/report']; |
|
|
|
// Build search string of "with attachment" filter |
|
$result = str_repeat(' OR', count($ctypes) - 1); |
|
foreach ($ctypes as $type) { |
|
$result .= ' HEADER Content-Type ' . rcube_imap_generic::escape($type); |
|
} |
|
|
|
return trim($result); |
What browser(s) are you seeing the problem on?
Chrome
What version of PHP are you using?
v8.3
What version of Roundcube are you using?
v1.7.0
JavaScript errors
No response
PHP errors
No response
Prerequisites
Describe the issue
Typing "has:attachment" in the search field can return different results than using the
Type:With attachmentUI filter. The latter uses the $HasAttachment/$HasNoAttachment keywords and produced better results (depending on IMAP server config) versus the former.$HasAttachment used:
roundcubemail/program/actions/mail/index.php
Lines 1548 to 1555 in 2e66510
$HasAttachment missing:
roundcubemail/program/actions/mail/search.php
Lines 367 to 375 in 2e66510
What browser(s) are you seeing the problem on?
Chrome
What version of PHP are you using?
v8.3
What version of Roundcube are you using?
v1.7.0
JavaScript errors
No response
PHP errors
No response