693 questions
2
votes
1
answer
77
views
imaplib2 | Is this behavior correct? The .uid() method returns different values in the tuple
I am not a programming pro, but I managed to find the following feature when using the .uid() method.
If the email address has unread messages that arrived before authorization and the first call to ...
0
votes
0
answers
83
views
move email from one yahoo folder to another
I'm running python 3.10 on ubuntu desktop 22. I'm running the code below. In the code I'm trying to move an email from one yahoo mail folder to another folder. The code does this by copying the ...
1
vote
2
answers
139
views
imaplib.IMAP4.error: SEARCH command error: BAD [b'The specified message set is invalid.'] , not able search with multiple filter's
mail.select("INBOX")
result, messages = mail.search(None, '(AND ("UNSEEN") ("SUBJECT" "important") ("FROM" "[email protected]"))')
When I use ...
0
votes
0
answers
46
views
Is it possible to use XOAUTH2 through imaplib to access Google Workspace Gmail without IMAP being enabled on the domain?
I have a task to build an integration with Gmail that will collect emails from a users inbox and store them within a Django system. The client I'm working with does not allow IMAP to be enabled on ...
0
votes
0
answers
46
views
How to reply emails with original content preserved using smtplib and imaplib
I want to use Python's smtplib and imaplib to implement reading emails (such as Gmail, Exchange) and replying to the original email. What I want to do is read an email, add a new message to the ...
0
votes
2
answers
2k
views
Python imaplib: Is there a consistent way to authenticate/login to Outlook via IMAP?
I'm literally junior to Python programming after years of C++ and C programming, and am trying to work in using Python to save all messages & attachments from Outlook, specifically imaplib.
My ...
0
votes
0
answers
195
views
Python imaplib b'LOGIN failed.'
My Python imaplib library code has recently stopped working for me.
This is the code I use:
import imaplib
imap = imaplib.IMAP4_SSL("outlook.office365.com")
imap.login("email@hotmail....
0
votes
0
answers
61
views
imaplib.IMAP4.error: command SEARCH illegal in state AUTH, only allowed in states SELECTED, unable to access any folder apart from inbox
I am unable to access any other folder apart from the inbox using imaplib. Did try changing the names of the folders to [Gmail]/Drafts but still the same error. The IMAP error: SELECT command error: ...
0
votes
1
answer
46
views
Can't get the main label from a mail
I'm trying to get all labels from my mails but it seems like I can't get the label I have currently selected, and by that, I can't delete it when I want to move the mail form one label to another.
...
1
vote
0
answers
301
views
Why am I getting "invalid credentials" error using IMAP4 to access Gmail account?
I am attempting to create a program that can download attachments from gmail, but I am getting this error message:
Exception has occurred: IMAP4.error
b'[AUTHENTICATIONFAILED] Invalid credentials (...
1
vote
0
answers
34
views
List out of range error using imaplib to search for a specific query
Why does my script below give me index out of range error while trying to excute the for statement.
Cant seem to figure it out.
When I use ALL as query this works.
Also notice that first email no &...
0
votes
1
answer
288
views
Unknown IMAP4 command: 'idle' When Accessing Inbox
I am trying to check for new emails in real time. I believe the code below should work but I get an "AttributeError: Unknown IMAP4 command: 'idle'" error. Can anyone see what the issue is?
...
0
votes
0
answers
553
views
imapliy.error:[AUTHENTICATION FAILED) Invalid credentials (Failure)
Good day everyone . I need help with my coding.
I'm using imaplib to login into gmail to send and receive messages
The code
Import imaplib
message = imaplib.IMAP4_SSL('imap.gmail.com)
message.login('...
0
votes
1
answer
240
views
python imaplib - gmail cannot be accessed
I am trying to access and read emails from my gmail account using a python script and imaplib, but whenever I run, I receive this message from the terminal:
imaplib.error: b'[AUTHENTICATIONFAILED] ...
0
votes
1
answer
162
views
See the raw IMAP commands when using imaplib or imap_tools
I am writing a Python 3 script to handle IMAP mailboxes, and I am having some problems with the server. When I connect to it "by hand" and try to send raw IMAP commands, the server is ...