Skip to content
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

email.spam() doesn't work??? #76

Open
EmolLi opened this issue Oct 23, 2016 · 1 comment
Open

email.spam() doesn't work??? #76

EmolLi opened this issue Oct 23, 2016 · 1 comment

Comments

@EmolLi
Copy link

EmolLi commented Oct 23, 2016

email.star()
email.read()
email.unstar()
.. all the other work
except email.spam()

AttributeError: Message instance has no attribute 'spam'

@adityadhawan22
Copy link

Add this function in message.py

def spam(self):
flag = '\Seen'
imap.uid('COPY', self.uid, '[Gmail]/Spam')
self.gmail.imap.uid('STORE', self.uid , '+FLAGS', '(\Deleted)')
if flag not in self.flags: self.flags.append(flag)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants