- Strip position:absolute style from HTML mails.
- Add ability to the Filters plugin to filter on Message Body, or both
the Headers and the Message Body.
+ - Update the message copy and move functions to allow for error handling.
+ - Fix the filter plugin from halting the login process when copying errors occur
Version 1.5.0
--------------------
* @param int $imap_stream The resource ID for the IMAP socket
* @param string $id The list of messages to copy
* @param string $mailbox The destination to copy to
- * @return bool
+ * @param bool $handle_errors Show error messages in case of a NO, BAD or BYE response
+ * @return bool If the copy completed without errors
*/
-function sqimap_msgs_list_copy($imap_stream, $id, $mailbox) {
+function sqimap_msgs_list_copy($imap_stream, $id, $mailbox, $handle_errors = true) {
$msgs_id = sqimap_message_list_squisher($id);
- $read = sqimap_run_command ($imap_stream, "COPY $msgs_id " . sqimap_encode_mailbox_name($mailbox), true, $response, $message, TRUE);
+ $read = sqimap_run_command ($imap_stream, "COPY $msgs_id " . sqimap_encode_mailbox_name($mailbox), $handle_errors, $response, $message, TRUE);
if ($response == 'OK') {
return true;
} else {
* @param int $imap_stream The resource ID for the IMAP socket
* @param string $id The list of messages to move
* @param string $mailbox The destination to move to
- * @return void
+ * @param bool $handle_errors Show error messages in case of a NO, BAD or BYE response
+ * @return bool If the move completed without errors
*/
-function sqimap_msgs_list_move($imap_stream, $id, $mailbox) {
+function sqimap_msgs_list_move($imap_stream, $id, $mailbox, $handle_errors = true) {
$msgs_id = sqimap_message_list_squisher($id);
- if (sqimap_msgs_list_copy ($imap_stream, $id, $mailbox)) {
+ if (sqimap_msgs_list_copy ($imap_stream, $id, $mailbox, $handle_errors)) {
return sqimap_toggle_flag($imap_stream, $id, '\\Deleted', true, true);
} else {
return false;