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
20
votes
5 answers

Office 365 XOAUTH2 for IMAP and SMTP Authentication fails

Recently the support for OAuth 2.0 for IMAP and SMTP in the Exchange Online has been announced. Following the guide I've set up the application permissions and IMAP and SMTP connection. The application is configured as Accounts in any organizational…
ledniov
  • 2,302
  • 3
  • 21
  • 27
20
votes
7 answers

php imap get from email address

How do I retrieve the email address from an email with imap_open? If the sender name is known I get the sender name instead of the email address if I use the 'from' parameter. Code: http://gist.github.com/514207
Frederik Heyninck
  • 221
  • 1
  • 2
  • 4
20
votes
6 answers

imap_open : couldn't open stream to my mail server

Notice: Unknown: Connection failed to mail.domain.com,143: Connection timed out (errflg=2) in Unknown on line 0 imap_open("{mail.domain.com:143/novalidate-cert}INBOX", 'login', 'password') The port 143 is open, I'm not behind a firewall, my…
Goku
  • 2,157
  • 2
  • 16
  • 31
20
votes
10 answers

Connecting to Gmail through IMAP with PHP - SSL context failed

I'm trying to connect to Gmail through IMAP with PHP running in Apache. This is on an Ubuntu 9.04 system. I've got some sort of PHP configuration issue that is keeping this from working. First, here's what I did to setup IMAP for PHP: sudo…
Clint Miller
  • 15,173
  • 4
  • 37
  • 39
19
votes
2 answers

Correct way to retrieve mails by IMAP in symfony2

I have to develop simple mail client in symfony2 using IMAP. Im wondering what is best way to retrieve messages from server (lets take a gmail as example)? I did something like this: public function indexAction($name) { $user =…
WombaT
  • 790
  • 1
  • 13
  • 27
19
votes
2 answers

IMAP: Search for messages with UID greater than X (or generally, after my last search)

I'm writing a script to analyze my mailbox and want to periodically check for new messages. The search criteria would be: give me the UIDs for all emails with UID greater than X, where X is the UID of the last email I processed. Or, more generally,…
Parand
  • 102,950
  • 48
  • 151
  • 186
19
votes
3 answers

Certificate error using IMAP in PHP

I used up all possible combinations of hostname but I always either get a certificate error or just IMAP connection broken. Certificate failure for imap.froiden.com: Server name does not match certificate: /O=imap.mailhostbox.com/OU=Go to …
Shashank Jain
  • 847
  • 2
  • 10
  • 25
19
votes
6 answers

What's a good mail server for development use?

I'm doing some development which will involve reacting to emails, and I'd like to use a local IMAP mail server for this. I currently use Devnull SMTP server for testing of sending emails, but this just logs and discards messages, it doesn't do IMAP…
Peter Boughton
  • 110,170
  • 32
  • 120
  • 176
19
votes
5 answers

SMTP and IMAP server library for .NET

Does anyone know a good SMTP/IMAP server library for C#? I only found some long abandoned projects. Only SERVER SIDE libraries, please no more posts about client libs. Thanks, Fionn
Fionn
  • 10,975
  • 11
  • 54
  • 84
18
votes
4 answers

SslHandshakeException: An error occurred while attempting to establish an SSL or TLS connection

I'm trying to access gmail emails using imap and the code is failing at the ssl handshake without showing me any errors. Really appreciate if anyone could please help with this. I've built this using xunit, .NET Core 2.1. I'm using MailKit Nuget …
Yohan Blake
  • 1,298
  • 4
  • 21
  • 43
18
votes
4 answers

Select mailbox "sent mail" or "all mail" in Ruby Net::IMAP

I'm trying to use Net::IMAP in Ruby to search all mail sent by me, but I'm having trouble selecting anything other than INBOX. imap.select('INBOX') works fine, but imap.select('Mail/sent-mail') as shown on the Net::IMAP documentation gives me…
Eli Albért
  • 686
  • 1
  • 6
  • 16
18
votes
5 answers

JavaMail: Keeping IMAPFolder.idle() alive

I am making a program that needs to monitor a Gmail account for new messages, and in order to get them ASAP I am using JavaMail's idle feature. Here is a code snippet from the thread I am using to call folder.idle(): //Run method that waits for idle…
Anders
  • 1,401
  • 3
  • 16
  • 20
17
votes
2 answers

PHP Library to read email

I currently use the SwiftMailer library to send email, but unfortunately it's only for sending, not receiving. I'm wondering... is there a similar library to connect via IMAP to an email account and read the email (IE give me the ability to loop…
TheFrack
  • 2,823
  • 7
  • 28
  • 47
16
votes
3 answers

search criteria of IMAP protocol search command

I read from here: http://docs.python.org/2/library/imaplib.html IMAP4.search(charset, criterion[, ...]) that imaplib has the search method for me to search mails from my mail boxes. But I don't understand what criterion are available, or is it that…
Jilin
  • 291
  • 1
  • 2
  • 12
16
votes
11 answers

Recommendations for a .NET component to access an email inbox

I've been asked to write a Windows service in C# to periodically monitor an email inbox and insert the details of any messages received into a database table. My instinct is to do this via POP3 and sure enough, Googling for ".NET POP3 component"…
Ian Nelson
  • 57,123
  • 20
  • 76
  • 103