Questions tagged [imap]

Internet message application protocol (commonly known as IMAP) is one of the two most prevalent Internet standard protocols for e-mail retrieval, the other being the Post Office Protocol (POP).

The Internet Message Access Protocol (commonly known as IMAP) is an Application Layer Internet protocol that allows an e-mail client to access e-mail on a remote mail server. The current version, IMAP version 4 revision 1 (IMAP4rev1), is defined by RFC 3501. An IMAP TCP server listens on well-known port 143.

IMAP supports both on-line and off-line modes of operation. E-mail clients using IMAP generally leave messages on the server until the user explicitly deletes them. This and other characteristics of IMAP operation allow multiple clients to manage the same mailbox. Most e-mail clients support IMAP in addition to POP to retrieve messages; however, fewer email services support IMAP.[2] IMAP offers access to the mail store. Clients may store local copies of the messages, but these are considered to be a temporary cache.

Incoming e-mail messages are sent to an e-mail server that stores messages in the recipient's email box. The user retrieves the messages with an e-mail client that uses one of a number of e-mail retrieval protocols. Some clients and servers preferentially use vendor-specific, proprietary protocols, but most support the Internet standard protocols, SMTP for sending e-mail and POP and IMAP for retrieving e-mail, allowing interoperability with other servers and clients. For example, Microsoft's Outlook client uses a proprietary protocol to communicate with a Microsoft Exchange Server server as does IBM's Notes client when communicating with a Domino server, but all of these products also support POP, IMAP, and outgoing SMTP. Support for the Internet standard protocols allows many e-mail clients such as Pegasus Mail or Mozilla Thunderbird (see comparison of e-mail clients) to access these servers, and allows the clients to be used with other servers.

http://en.wikipedia.org/wiki/Internet_Message_Access_Protocol

4517 questions
28
votes
5 answers

Downloading attachments to directory with IMAP in PHP, randomly works

I found PHP code online to download attachments to a directory using IMAP from here. http://www.nerdydork.com/download-pop3imap-email-attachments-with-php.html I modified it slightly changing $structure = imap_fetchstructure($mbox, $jk); …
Nick
  • 281
  • 1
  • 3
  • 5
27
votes
5 answers

How hard is it to build an Email client? - Python

I'm venturing in unknown territory here... I am trying to work out how hard it could be to implement an Email client using Python: Email retrieval Email sending Email formatting Email rendering Also I'm wondering if all protocols are easy/hard…
RadiantHex
  • 24,907
  • 47
  • 148
  • 244
27
votes
4 answers

How do I enable push-notification for IMAP (Gmail) using Python imaplib?

Is there a way to monitor a gmail account using imaplib without polling gmail each time I want to see if there is new mail. Or in other words, I just want the script to be notified of a new message so I can process it right away instead of any lag…
RaySl
  • 497
  • 2
  • 7
  • 14
26
votes
5 answers

Accessing emails from gmail using IMAP ( javamail API)

I am trying to access emails from Gmail accounts through IMAP with the help of the JavaMail API. I was wondering why the code works for one email account but doesn't work for another. I am able to access the Inbox folder of both email accounts. But…
Ragini
  • 1,509
  • 7
  • 28
  • 42
26
votes
4 answers

What protocol does Google use for Gmail? (not IMAP or POP)

You can access gmail either using the web interface, Google's Android client or using IMAP. As far as I can tell, the web interface and the Android app uses a completely different protocol than IMAP -- they are not just interfaces on top of it. The…
Björn Lindqvist
  • 19,221
  • 20
  • 87
  • 122
26
votes
9 answers

Find Gmail url-IDs via IMAP

One of my favourite features of Gmail is the ability to bookmark urls to certain messages like this: https://mail.google.com/mail/#all/124c8f386d41fd3a What I would like to do is write a script that accesses my Gmail account via IMAP and creates an…
Felix Geisendörfer
  • 2,902
  • 5
  • 27
  • 36
26
votes
2 answers

Java Mail to Exchange Server "no login methods supported"

I am trying to implement a Java Mail servlet, first step is connecting to the IMAP server. I am able to telnet to the server on port 143 (default IMAP port), telnet says: OK The Microsoft Exchange IMAP4 service is ready. Now I am trying to connect…
egerardus
  • 11,316
  • 12
  • 80
  • 123
24
votes
6 answers

Python IMAP: =?utf-8?Q? in subject string

I am displaying new email with IMAP, and everything looks fine, except for one message subject shows as: =?utf-8?Q?Subject?= How can I fix it?
janeh
  • 3,734
  • 7
  • 26
  • 43
24
votes
4 answers

IMAP: how to move a message from one folder to another

(using the IMAP commands, not with the assistance of any other mail package)
Mark Harrison
  • 297,451
  • 125
  • 333
  • 465
23
votes
2 answers

Javascript IMAP and SMTP client?

Is it possible to build a SMTP/IMAP client that can run in the browser that uses only Javascript?
Alexis
  • 23,545
  • 19
  • 104
  • 143
22
votes
4 answers

Advanced message filter rules in Mozilla Thunderbird

The filter mechanism of Thunderbird is nice for simple things. But I want to do something like (If message contains xy or sender is yz) and status is read, move to trash The problem is, one filter rule can only match any (= OR) or all (=AND) …
user3001
  • 3,437
  • 5
  • 28
  • 54
21
votes
3 answers

JavaMail IMAP over SSL quite slow - Bulk fetching multiple messages

I am currently trying to use JavaMail to get emails from IMAP servers (Gmail and others). Basically, my code works: I indeed can get the headers, body contents and so on. My problem is the following: when working on an IMAP server (no SSL), it…
Justmaker
  • 1,261
  • 2
  • 11
  • 20
21
votes
5 answers

Office 365 IMAP authentication via OAuth2 and python MSAL library

I'm trying to upgrade a legacy mail bot to authenticate via Oauth2 instead of Basic authentication, as it's now deprecated two days from now. The document states applications can retain their original logic, while swapping out only the…
quickshiftin
  • 66,362
  • 10
  • 68
  • 89
21
votes
4 answers

JavaMail reading recent unread mails using IMAP

I have a requirement to retrieve unread mails from Gmail. I am using Java Mail API. By default, this API retrieves mails from the oldest to newest. But I need to retrieve recent mails first. Is it possible? Thanks in advance.
Ram Bavireddi
  • 1,139
  • 1
  • 19
  • 43
21
votes
3 answers

Getting only new mail from an IMAP server

I am writing a client application that fetches emails from an IMAP server and then stores them in a database. The problem is that once I have checked the mail, the next time I only want to download the mail that has arrived since. So if I had…
Abhishiv Saxena
  • 628
  • 1
  • 8
  • 14