Rahul Vyas
Rahul Vyas

Reputation: 28720

How to move message to Trash in gmail imap?

I am creating an application in which I need to delete mail using IMAP in gmail. But when I set the flag to delete the message moves to spam folder instead of trash or directly deletion. Is there any way to move message to trash?

UPDATE

Now my messages are moving from inbox to important folder. I'm sending message to my self( in web browser) and it's marked as important by default.

Upvotes: 0

Views: 1299

Answers (2)

iamdavidlam
iamdavidlam

Reputation: 404

Adding onto flob's answer

the following folder paths works too

it seems like it's depending on when the user sign up for gmail

"[Gmail]/Trash"

"[Google Mail]/Bin"

"[Gmail]/Bin"

Upvotes: 0

flob
flob

Reputation: 3908

There is a Google support site that says "Do NOT save deleted messages to your [Gmail]/Trash folder because this will delete a message in all folders." - so you might want to do exactly that :)

Upvotes: 0

Related Questions