Powered by Blogger.

How to make vTiger Mail Manager Delete Functionality Work

One really important bug of vtiger mail manager is the inability to mass delete emails. When the user selects a list of emails and hits the delete button, this emails are marked for deletion, and are hidden from the vtiger mail manager view, but these emails are not actually deleted from the server.

As you can imagine this bug tends to be really annoying if you use your emails in more than one device: You may delete an email in vtiger, but it keeps appearing in your phone, or in other webmail client.

To solve this issue you need to edit the file located in: \modules\MailManager\src\connectors\Connector.php and add the following line to the code: /** * Function which deletes the mails * @param String $msgno - List of message number seperated by commas. */ function deleteMail($msgno){ $msgno = trim($msgno,','); $msgno = explode(',',$msgno); for($i = 0;$i<count($msgno);$i++){ @imap_delete($this->mBox, $msgno[$i]); } //New Line @imap_expunge($this->mBox); // End New Line }

By adding this line, you are purging from the server the messages that were marked for deletion. This solves the non deleted emails from vtiger Mail Manager.

Besides from this, you may not have noticed, but after you have deleted a single email from the inbox, two emails are hidden, the one you want to delete and the previous one on the list. To solve this issue you need to edit the JS file, look for maildelete: function and edit according to the following:MailManager.Request('index.php?'+baseurl, params, function() { for(var i = 0;i<msgno.length;i++) { var ele ="#_mailrow_"+msgno[i]; jQuery(ele).fadeOut(1500,function() { jQuery(ele).remove(); // Changes by VGS Global Add the following: if(reloadfolder == true) { if(foldername == "__vt_drafts") { MailManager.folder_drafts(); } else { MailManager.folder_open(foldername); } } }); } }); 

In today’s post we have solved two bugs from vtiger mail manager. If you are looking for professional vTiger support to solve any kind of bug, feel free to contact us.
    Blogger Comment
    Facebook Comment