Questions tagged [imapclient]

IMAPClient aims to be a easy-to-use, Pythonic and complete IMAP client library with no dependencies outside the Python standard library.

68 questions
0
votes
1 answer

Imapclient module not reading emails PROPERLY

I am using python3 and, using my email credentials, this function prints a block of text that appears to be divided into formal sections. Here is my code for reading emails: import pprint import imapclient # Email = Your email # Password = Your…
0
votes
0 answers

Why does python getpass not work for connecting to gmail using imapclient, and how should I accomplish connecting in instead?

I want to connect to gmail using imapclient. I've followed the example from the book "Automate the Boring Stuff with Python" chapter 16 by Al Sweigart. The code from the book works well in interactive mode. However, Al and others warn to not include…
John
  • 11
  • 6
0
votes
1 answer

Unable to sort using Mail::IMAPClient

Yesterday I was trying to sort the emails coming from imap using the Mail::IMAPClient library doing the following: my $imap = Mail::IMAPClient->new( #my imap settings ); #folder selection my @messages = $imap->sort('(REVERSE ARRIVAL) UTF-8…
sergiotarxz
  • 520
  • 2
  • 14
0
votes
1 answer

The returned hash from fetch_hash in Mail::IMAPClient doesn't meet the parameters I send

This is a auto answered question about a problem I had and I found no answer, the problem is the following: use Mail::IMAPClient; $imap = new Mail::IMAPClient( # My connection data. }; #Folder selection and stuff like that. my $hash =…
sergiotarxz
  • 520
  • 2
  • 14
0
votes
1 answer

Automatically determining IMAP server name by email address

I am working on my own email client app. And currently, when a user adds a new mailbox, I make them to input IMAP server name manually (say, imap.gmail.com). By I've notices that there are mail client apps that somehow figure out the correct IMAP…
Crazy Frog
  • 495
  • 8
  • 17
0
votes
1 answer

Marking message as spam or important

I have a Django email client powered by IMAPClient library. I successfully control read/unread status, as well as deleted. As descriped here. My code for declaring a message as readlooks like this: from imapclient.imapclient import…
Edgar Navasardyan
  • 4,261
  • 8
  • 58
  • 121
0
votes
1 answer

Python IMAPClient - why do we need slashes in the attributes of label names

I am working on an email client, and I wonder what is the role of slashes in the attribute descriptions of labels. For example, I have a label which looks like this: ((b'\\HasChildren', b'\\Noselect'), b'/', 'my_label_name') When I try to parse the…
Edgar Navasardyan
  • 4,261
  • 8
  • 58
  • 121
0
votes
1 answer

Interaction between Python IMAPClient library and email package

I have a Django project where I am working on an email client. I've decided to use python's IMAPClient instead of standard library's imaplib for getting access to the messages. Currently, I don't make use of python's email package to encode/decode…
Edgar Navasardyan
  • 4,261
  • 8
  • 58
  • 121
0
votes
1 answer

Python IMAPClient - fetching UID

I am using IMAPClient in my Django email client, and currently I am trying to fetch UIDs of the first fifty messages in a given mailbox by the following code: server = IMAPClient(HOST, use_uid=True, ssl=True) server.login(USERNAME,…
Edgar Navasardyan
  • 4,261
  • 8
  • 58
  • 121
0
votes
0 answers

Issue using MailKit to fetch gmail emails

I 'm working on an mvc application to fetch emails from my gmail account using MailKit, on my local computer it works perfectly. However, when uploading it on the host i get the "A socket operation was attempted to an unreachable network". I don't…
Mr.K
  • 1
  • 2
0
votes
1 answer

Python IMAPClient fetch() method optimization for large data

I am writing an email client using IMAPClient. My goal now is to render the list of messages in my INBOX. The number of messages amount to around 4 thousand. The problem is that it takes ages to fetch these letters like this: server =…
Edgar Navasardyan
  • 4,261
  • 8
  • 58
  • 121
0
votes
0 answers

The handshake failed due to an unexpected packet format at IMAP implementation

I have tried to read my mail inbox through c# code and it has given an error "the handshake failed due to an unexpected packet format". Here is my code, using AE.Net.Mail; using System; using System.Collections.Generic; using…
Hash_S
  • 79
  • 4
  • 18
0
votes
1 answer

Python 3 IMAPClient object error

I try to call the imapclient.IMAPClient() function to create an IMAPClient object. Code is like that: import imapclient imapObj = imapclient.IMAPClient('imap.gmail.com', ssl=True) print('Enter your mail adress') mail = input() print('Enter your…
Purgoufr
  • 761
  • 14
  • 22
0
votes
1 answer

Issues installing pyzmail or imapclient on python 3.5, pip throws a value and syntax error

I am trying to download a couple of packages in python 3.5 but pip keeps throwing an exception(via pip install pyzmail), please see below: How do I overcome this issue? Exception: Traceback (most recent call last): File…
Luis
  • 1
0
votes
2 answers

How to obtain the recipient list from email using IMAPClient in Python

I am using the IMAPClient library in Python. I am able to download the attached document in the email. I am interested in only Excel files. I am interested to extract the recipient list from the email. Any idea how to do it in Python ? Here is the…
Kiran
  • 8,034
  • 36
  • 110
  • 176