Questions tagged [imaplib]

Python module to provide an Internet Message Access Protocol (IMAP) client implementation. This protocol lets you access mail folders stored on a central mail server, as if they were local.

Python module to provide an Internet Message Access Protocol (IMAP) client implementation. This protocol lets you access mail folders stored on a central mail server, as if they were local.

694 questions
0
votes
1 answer

Operation timed out despite socket.setdefaulttimeout()

I'm trying to connect to an imap server: mailbox = imaplib.IMAP4_SSL(host=server, port=port) This results in a timeout: [Errno 60] Operation timed out So I tried to increase the timeout: import socket socket.setdefaulttimeout(4000) mailbox =…
user3255061
  • 1,757
  • 1
  • 30
  • 50
0
votes
0 answers

robotframework-imaplibrary2 0.3.2 is not working in Robot framework

After installing new robotframework-imaplibrary2 0.3.2 and try to use I get an error, “ No keyword with name 'Open Mailbox' found.” open mailbox host=outlook.office365.com user=****** password=******* No keyword with name 'Open Mailbox' found.
meca singh
  • 65
  • 4
  • 10
0
votes
1 answer

Get e-mail recieved date of IMAP using Python

I'm using the following code (got it from StackOverflow :)) to get all unread e-mail from specific email adresses. It works perfect! I would however like to get the actual recived (or sent) date for each e-mail I'm getting an attached file from. But…
Nicolai
  • 1
  • 1
0
votes
0 answers

Is there a way to use python imaplib fetch big or large attachment in stream?

I'm using python imaplib to fetch email from server. All things goes well. when I "fetch", the thread will be blocked and whole attachment will be fetched as base64 string in payload. I wonder how or what to do if the attachment is large or big? And…
W.X
  • 175
  • 2
  • 13
0
votes
2 answers

How to parse credential args to a function handling imaplib protocols

I have a list of emails(mine) that I want to test against a list of passwords(All valid and some none valid of course) using imaplib library. Whenever I test the program ordinarily like in the code below, it works perfectly no errors. import…
0
votes
0 answers

imaplib search returning empty results when using variable

When I'm searching an email account using imaplib I need to be able to search with variables to cycle through a large number of automated mail, but I'm getting different results between when I explicitly pass a string and when I pass a variable with…
David Scott
  • 796
  • 2
  • 5
  • 22
0
votes
0 answers

Take the body of an email questionnaire and extract the answers to a .csv

I am able to log into my email, search my inbox for any unread messages, and print the body of the unread messages but I am trying to write the answers to my questionnaire to a pandas dataframe. Example of questionnaire email when I receive…
rzaratx
  • 756
  • 3
  • 9
  • 29
0
votes
0 answers

Python IMAPlib TimeoutError: [WinError 10060]

I am trying to save attachments of my outlook account emails to a local directory and the code was working perfectly till now, it starts showing error and I am not able to get this through. Can anybody please help with this? TimeoutError: [WinError…
DKM
  • 1,761
  • 2
  • 19
  • 34
0
votes
1 answer

Unable to return email message body

I have created a class to read emails and convert to a dataframe. This works for all HEADER data but I am unable to parse the message content and have tried numerous methods. I am following a tutorial from here…
Sql_Pete_Belfast
  • 570
  • 4
  • 23
0
votes
1 answer

Read gmail and printing it

I want to only print the sender name and message of a received gmail in Python. I tried the code given below. Please help me with that. import imaplib mail = imaplib.IMAP4_SSL('imap.gmail.com') mail.login('raskarakash2017@gmail.com',…
0
votes
1 answer

How to resolve socket error when connecting to imap.gmail.com via port 993 using imaplib?

import imaplib s = imaplib.IMAP4_SSL('imap.gmail.com', 993) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.6/imaplib.py", line 1138, in __init__ IMAP4.__init__(self, host, port) File…
0
votes
0 answers

Read mail using python with smtplib

I'm able to send mail using python script , here is my code import smtplib, ssl smtp_server = "xxx.yyyy.com" sender_email = "abcd@efgh.com" receiver_email = "mnop@efgh.com" username ='DRAETWK' password = 'password' message = """\ Subject: Test…
aruntheimperfect
  • 231
  • 1
  • 3
  • 11
0
votes
1 answer

How do I access "gmail" umbrella account with non-gmail domain name?

I need to search through all of someone's emails for a compliance exercise. The individual has one gmail account that he forwards all of his other accounts to. However, I get an authentication error when I try to access the umbrella account, despite…
kalidurge
  • 279
  • 2
  • 11
0
votes
1 answer

Python Download Attachment from Outlook w/ Imaplib4 Never downloads the last Attachment

The script I wrote:1) connects to my work Outlook email. The script reads my username and password from a text file which is found in the variable TextFilePath. 2) Looks for attachments based upon a searchterm I choose that would be in the Subject…
BrianBeing
  • 431
  • 2
  • 4
  • 12
0
votes
1 answer

Python3 Parsing Email Body Differently than Python2

Currently I am working on an email parser that simply uses imaplib to establish a connection to my gmail account and read new emails. This all works fine and the results are as expected when running my script using python2 (i.e "python…
Biggytiny
  • 519
  • 10
  • 29