node-red-nodes icon indicating copy to clipboard operation
node-red-nodes copied to clipboard

email node not deleting email in gmail

Open carefulcomputer opened this issue 5 years ago • 7 comments

Which node are you reporting an issue on?

node-red-node-email

What are the steps to reproduce?

configure a gmail account to receive email (using ssl) from a specific folder (aka label in gmail). also set disposition to 'delete'.

What happens?

email is not deleted after it is fetched. (not sure if relevant - my emails have attachment which i save in node red)

What do you expect to happen?

email should be deleted after it is fetched successfully

Please tell us about your environment:

  • [0.19.5 ] Node-RED version:
  • [8.10.0 ] node.js version:
  • [3.5.2 ] npm version:
  • [ Ubuntu 16.4] Platform/OS:
  • [ Chrome] Browser:

carefulcomputer avatar Jan 08 '19 07:01 carefulcomputer

Labels !== folders...

All deleting from a "label" does is remove the label by default - you can change that behaviour on your gmail account - eg see gmail settings - pop and imap

image

Archiving will just tag it archived but leave it on the server - Deleting from the inbox does delete it.

dceejay avatar Jan 08 '19 09:01 dceejay

Here are my settings. After fetch, email still stays up in inbox (unread, with same label). i.e there is no change in email at all.

The second set of option labeled "When a message is marked as deleted and expunged from the last visible IMAP folder:" only gets enabled if I set "Auto Expunge Off".

image

carefulcomputer avatar Jan 08 '19 15:01 carefulcomputer

I observe this behavior as well. No combination of gmail settings causes the message to be deleted. It doesn't matter if it's in a folder or the inbox.

PhilRW avatar Jul 17 '19 19:07 PhilRW

I'm seeing this as well using a Dovecot IMAP server. The message is read by node-red ok but never gets deleted so just sits in the inbox as unread and triggers the email node every time it's polled

mikepont avatar Jul 19 '19 21:07 mikepont

mikepont- Set the criteria to unseen to prevent recurrent triggers. Marking to unseen appears to work. I wrote an R program using the Gmailr package to delete emails. I can call it via shell command from node RED periodically to clean up the mailbox

slomanl1 avatar Nov 08 '19 03:11 slomanl1

I'm also experiencing this issue but not with Gmail, I'm using an IMAP account and no configuration is able to delete an email once it's been processed (it's not even marked as read) although changing the setting to read works correctly.

romprod avatar Jan 20 '22 15:01 romprod

I too am not using gmail and having this problem. It is correctly marking it as read when that is selected as the disposition.

awamos avatar Oct 06 '22 00:10 awamos