-
-
Notifications
You must be signed in to change notification settings - Fork 173
delete method not working on Gmail #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Here is a very good explanation on the why the "\Deleted" flag does nothing on Gmail: Resume: On Gmail, add "\Deleted" flag is not enough, you need to move the message to "[Gmail]/Trash" as well. The main problem to me now is that if I move the message to Trash, I get hit by #105 problem. |
Hi @EthraZa , Ref.: Best regards, |
Do you have a reliable way to detect when you are connected to Gmail? Edit: |
Yeah I was wondering about this as well.. Best regards, |
Also taking a look at Gmail IMAP Extensions Maybe the delete method can look something like this: public function delete($expunge = true, $trash_path = "[Gmail]/Trash", $force_move = false) {
$status = $this->setFlag("Deleted");
if($force_move || in_array("X-GM-EXT-1", $this->client->getConnection()->getCapabilities())) {
$status = $this->move($trash_path);
}
if($expunge) $this->client->expunge();
$event = $this->getEvent("message", "deleted");
$event::dispatch($this);
return $status;
} What do you think? |
Hi @EthraZa , Best regards, |
At least on Gmail, I can't get delete to work. It returns true, but does nothing.
Manually set 'Deleted' flag on a message does nothing as well.
Am I noobing here?
The text was updated successfully, but these errors were encountered: