node-red / node-red-nodes

Extra nodes for Node-RED
Other
983 stars 592 forks source link

email node not deleting email in gmail #512

Open carefulcomputer opened 5 years ago

carefulcomputer commented 5 years ago

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:

dceejay commented 5 years ago

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.

carefulcomputer commented 5 years ago

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

PhilRW commented 5 years ago

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.

mikepont commented 5 years ago

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

slomanl1 commented 4 years ago

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

romprod commented 2 years ago

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.

awamos commented 1 year ago

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