* Enables message moving between folders on the IMAP server.
*
* $Id$
+ * @package squirrelmail
*/
-/* Path for SquirrelMail required files. */
+/** Path for SquirrelMail required files. */
define('SM_PATH','../');
/* SquirrelMail required files. */
}
array_shift($body_a);
+ array_pop($body_a);
$body = implode('', $body_a);
$body .= "\r\n";
$fp = fopen( $full_localfilename, 'wb');
fwrite ($fp, $body);
fclose($fp);
- $composeMessage->initAttachment('message/rfc822',$subject.'.eml',
+ $composeMessage->initAttachment('message/rfc822',$subject.'.msg',
$full_localfilename);
}
}
sqgetGlobalVar('markUnread', $markUnread, SQ_POST);
sqgetGlobalVar('attache', $attache, SQ_POST);
sqgetGlobalVar('location', $location, SQ_POST);
+sqgetGlobalVar('bypass_trash', $bypass_trash, SQ_POST);
/* end of get globals */
sqimap_toggle_flag($imapConnection, $id, '\\Seen',false,true);
} else {
if (!$button_action) {
- sqimap_msgs_list_delete($imapConnection, $mailbox, $id);
+ sqimap_msgs_list_delete($imapConnection, $mailbox, $id,$bypass_trash);
if ($auto_expunge) {
$cnt = sqimap_mailbox_expunge($imapConnection, $mailbox, true);
}
} else { // Move messages
if (count($id)) {
- sqimap_msgs_list_copy($imapConnection,$id,$targetMailbox);
+ sqimap_msgs_list_move($imapConnection,$id,$targetMailbox);
if ($auto_expunge) {
$cnt = sqimap_mailbox_expunge($imapConnection, $mailbox, true);
} else {