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
117
votes
6 answers

Accessing Imap in C#

Is there a built-in method to access an Imap server (with SSL) in C# or is there a good free library?
UnkwnTech
  • 88,102
  • 65
  • 184
  • 229
76
votes
10 answers

Getting mail from GMail into Java application using IMAP

I want to access messages in Gmail from a Java application using JavaMail and IMAP. Why am I getting a SocketTimeoutException ? Here is my code: Properties props = System.getProperties(); props.setProperty("mail.imap.host",…
Dave of San Ramon
  • 1,471
  • 1
  • 11
  • 8
67
votes
13 answers

Fatal error: Call to undefined function imap_open() in PHP

I am trying to access my gmail account through my localhost. However, I am getting the response: Fatal error: Call to undefined function imap_open() This is my code: $hostname = '{imap.gmail.com:993/imap/ssl}INBOX'; $username =…
Sumit
  • 2,242
  • 4
  • 25
  • 43
58
votes
4 answers

How to talk to IMAP server in Shell via OpenSSL

I want to send IMAP commands via Mac OS X Terminal to server and get response. I can connect to the server using this line: openssl s_client -connect imap.gmail.com:993 And I can successfully login: ? LOGIN m.client2 passwordhere But all other…
Denis Kutlubaev
  • 15,320
  • 6
  • 84
  • 70
47
votes
6 answers

How to get the list of available folders in a mail account using JavaMail

I am using JavaMail API to connect to my personal account. I have list of folders (labels) in my Gmail account which I created + the default folders like Inbox, Drafts etc. How can I list all the available folders (the default and the user created)?…
Jagadesh
  • 6,489
  • 8
  • 29
  • 30
42
votes
1 answer

Delete Email on Server using javax.mail

I am receiving emails from the server using the IMAP protocol like it is described here. This is working very fine and I can store the emails and attachments on the disk. Question: Do I have the possibility to delete files from the Server, so that…
Markus Lausberg
  • 12,177
  • 6
  • 40
  • 66
40
votes
1 answer

How to understand the equal sign '=' symbol in IMAP email text?

I am currently using Python imaplib to process email text. I use fetch command to fetch the raw data email from GMail server. However, I found one thing really tricky - the equal sign '='. It is not a normal equal sign but a special symbol. For…
JXITC
  • 1,110
  • 1
  • 13
  • 27
39
votes
4 answers

Reading emails from Gmail in C#

I am trying to read emails from Gmail. I have tried every API / open source project I can find, and can not get any of them working. Does anyone have a sample of working code that will allow me to authenticate and download emails from a Gmail…
Seany84
  • 5,526
  • 5
  • 42
  • 67
37
votes
10 answers

using c# .net libraries to check for IMAP messages from gmail servers

Does anyone have any sample code in that makes use of the .Net framework that connects to googlemail servers via IMAP SSL to check for new emails?
Belliez
  • 5,356
  • 12
  • 54
  • 62
34
votes
8 answers

Check unread count of Gmail messages with Python

How can I check the number of unread Gmail message in my inbox with a short Python script? Bonus points for retrieving the password from a file.
Steven Hepting
  • 12,394
  • 8
  • 40
  • 50
33
votes
7 answers

Downloading multiple attachments using imaplib

How can I download multiple attachments from a single mail using imaplib? Let's say I have an e-mail and that e-mail contains 4 attachments. How can I download all of those attachments? The code below only downloads a single attachment from an…
harde
  • 331
  • 1
  • 3
  • 3
30
votes
8 answers

Move an email in GMail with Python and imaplib

I want to be able to move an email in GMail from the inbox to another folder using Python. I am using imaplib and can't figure out how to do it.
Dan
  • 3,777
  • 4
  • 25
  • 23
30
votes
4 answers

IMAP client in Java: JavaMail API or Apache Commons Net?

I have to implement an IMAP Client in Java. Which advantages has using the Apache Commons Net library? Does it make the implementation robust and more flexible? How do I have to handle return values, it always produces strings. For example: public…
benchpresser
  • 2,171
  • 2
  • 23
  • 41
29
votes
5 answers

How can you send mail using IMAP?

I am developing a lightweight Gmail client for mobile phones, accessing Gmail by IMAP. I want to send a draft from the Drafts folder, but it has some attachments and I cannot download all of them to send it by SMTP. Moving/copying it to "Sent Mail"…
Ignacio Lago
  • 2,432
  • 1
  • 27
  • 33
28
votes
9 answers

imap - how to delete messages

How can I delete messages from the mail box? I am using this code, but the letters are not removed. Sorry for my English. def getimap(self,server,port,login,password): import imaplib, email box = imaplib.IMAP4(server,port) …
Derek
  • 341
  • 1
  • 4
  • 5
1
2 3
99 100