597 Commits (808565e979130b75fe10afc9652a838b774007cc)
 

Author SHA1 Message Date
Brian White 690faff0f1 Merge pull request #24 from addrummond/master
Small changes to regular expressions
13 years ago
Alex Drummond 164afe0bc4 Modify another regex where quotes may not always be present. 13 years ago
Alex Drummond c1a8fedebd Exchange doesn't always quote mailbox names -- make quotes optional in regex. 13 years ago
Brian White 8753fc28ec Fix LIST response for Zimbra
Thanks @jmoyers

Closes #20
13 years ago
Brian White 7aaeeced9e Remove unnecessary portions from regexps for mailbox status responses 13 years ago
Brian White 04753b2423 Add ability to fetch an entire email message (including headers) by specifying 'full' for the body property with fetch(). 13 years ago
Brian White d1bbfe7e5f Fix crash during message headers transfer and fix 'UID' search. 13 years ago
Brian White ec4111df22 Manipulate buffers instead of utf8 strings when retrieving headers or message bodies. 13 years ago
Brian White 6e99f17fc1 Fixes for malformed multipart bodies and global replacement for escape()/unescape(), and code reformat to better fit within 80 columns. 13 years ago
Brian White a9e8763263 Fix connection timeout 13 years ago
Brian White 3f5164b3b6 Merge pull request #10 from huancz/master.
fix parsing of EXAMINE response
13 years ago
Petr Běhan 98e04c0983 bugfix: broken _uidnext parsing in openBox 13 years ago
Brian White 38c88ff4b3 Bump version 13 years ago
Brian White ed74906dc2 Fix duplicate sending of commands bug, refactor literal data handling, and make idling a little smarter 13 years ago
Brian White 52a6d93d71 Fix overriding of defaults in fetch() 13 years ago
Brian White e17d21f6f1 fetch() should check for a blank uids argument 13 years ago
Brian White 3b61bca20c Allow fetching of entire raw message (headers + body) by specifying an empty string for fetch()'s body property 13 years ago
Brian White 6c4b229ae5 Bump version 13 years ago
Brian White b23bcb877a A few fixes and some minor changes
Fixes:

* markSeen property for imap.fetch works again

* Queued commands were being sent before waiting for the server's response when exiting idle mode

* Dispositions for multipart subtypes are now set properly

Other changes:

* Removed the last remnants of the ugly parsing of server responses

* Don't attempt to send IDLE to the server if we are about to log out

* Some of the message/rfc822 envelope header names were renamed to match what those names that are expected
13 years ago
Brian White ab6403735c Simplify and fix parsing of message structures and mailbox namespaces 13 years ago
Brian White 375fae406b bump version 13 years ago
Brian White c8a95325f0 IDLE support
If the IMAP server supports it, the IDLE extension will automatically be used in place of NOOP/polling when a mailbox is open. This means notifications of mailbox changes (e.g. when new mail arrives) will automatically be pushed to the client as they happen. Rejoice!
13 years ago
Brian White 7a9ae9f9bd Fix README markdown format so it renders correctly on github. 13 years ago
Brian White cbeb2b95c6 Fix retrieval of utf8-encoded message bodies and fetching of only message structures. 13 years ago
Brian White 92e91ca3c1 More reliable new mail event detection. 13 years ago
Brian White 658e06426c Bump version to v0.2.0 13 years ago
Vytautas Jakutis bfcacac2c0 as noted by mscdex: openBox should use the emptyFn variable instead of creating a new empty function every time when readonly and cb are undefined. 13 years ago
Vytautas Jakutis e739623172 fixing openBox method for node-0.4.0 (was broken when the argument "readOnly" was skipped by the user) 13 years ago
Vytautas Jakutis 1e1031f06d fixes the ImapConnection.getBox method.
the code is:

	console.log(params);
	var imap = new require('../submodules/node-imap/imap').ImapConnection({
		username: params.username,
		password: params.password,
		host: params.hostname,
		port: params.port,
		secure: true
	});
	imap.connect(function(r, err) {
		if(err) {
			console.log('Connection failed. Quitting.');
		} else {
			imap.getBoxes(function() {
				console.log(arguments);
				console.log('Done. Quitting.');
				imap.logout();
			});
		}
	});

the output is:

	{ hostname: '*******',
	  port: '993',
	  username: '*******',
	  password: '*******' }

	/home/tahu/workspace/mailget/submodules/node-imap/imap.js:292
	                if (!curChildren[path[i]].children)
	                                         ^
	TypeError: Cannot read property 'children' of undefined
	    at CleartextStream.<anonymous> (/home/tahu/workspace/mailget/submodules/node-imap/imap.js:292:42)
	    at CleartextStream.emit (events.js:42:17)
	    at CleartextStream._push (tls.js:257:31)
	    at SecurePair._cycle (tls.js:514:18)
	    at EncryptedStream.write (tls.js:72:13)
	    at Socket.ondata (stream.js:15:26)
	    at Socket.emit (events.js:42:17)
	    at Socket._onReadable (net.js:649:14)
	    at IOWatcher.onReadable [as callback] (net.js:156:10)
13 years ago
Brian White 0ed5b5b32f Update TODO 13 years ago
Brian White 5aaa70e68f 0.4.0 compatibility. 0.2.x no longer supported. 13 years ago
Brian White d9e705dea8 Modify fetch() to be async and to no longer buffer message bodies. Fix NOOP handling. 13 years ago
Brian White b9718b5402 Add configurable debug function in constructor options and incorporate a few fixes. 14 years ago
Brian White 093f95006c Initial commit of package.json. 14 years ago
Brian White 2a6d162025 More refactoring, fixes, and additional features.
copy(), move(), fetch(), *Flags(), and *Keywords() methods now allow multiple message IDs.

move() now actually expunges the original message after copying, rather than merely setting the Deleted flag.

Removed command-specific items from the global state data and greatly simplified the populating of callback arguments.

Smarter literal data handling.

search() no longer goes kaput when no messages match the given criterion.

fetch() now always passes an Array to the callback.

Only pass the mailbox object to the callback for openBox() and renameBox().

Added UID criteria for search().

Fixed parsing of FETCH responses and added the message ID to the object generated by the FETCH parser.
14 years ago
Brian White 1519eb3043 Lots of additions and fixes.
Mailbox namespaces (if supported by the server) are now available as a property of ImapConnection and is automatically populated right after login.

The server's (top-level) mailbox hierarchy delimiter is also now available as a property of ImapConnection.

Reverted changes to allow reuse of an ImapConnection instance (for now).

Mailbox and message flags now no longer include the backslash prefix. Additionally, the preceding backslash for flags is not needed for functions that accept flags.

Added additional mailbox-specific methods: getBoxes, addBox, delBox, and renameBox.

Added additional message-specific methods: addKeywords, delKeywords, copy, and move.

Added keyword search option.

Refactored parsing functions a bit to make things a little more DRY.
14 years ago
Brian White 4af7472a7b Implement "OR" for message search. 14 years ago
Brian White e45b904800 Implemented configurable connection timeout.
Update and fix for README too.
14 years ago
Brian White a10f9539f0 Fix README layout issue. 14 years ago
Brian White 09b2fe0968 Swap out regex used for parsing FETCH responses for a real parser. Not all IMAP servers respond with the requested FETCH data in the same order. 14 years ago
Brian 0bc8f47e97 Added the ability to specify a byte range when fetching a message's (raw or part) body. Fixed a bug that was causing flags to not be added or removed at all. Lastly, a list of available permanent flags for the current mailbox is now available under the permFlags property of the mailbox object. 14 years ago
Brian 0c5ed3df53 Added support for IMAP STORE and EXPUNGE commands, fixed parsing of dispositions with NIL parameters in BODYSTRUCTUREs, and fixed the regex for capturing the BODYSTRUCTURE sent by the server. 14 years ago
Brian c45ab05455 Fixed error in README. 14 years ago
Brian e87b527fc3 Add license. 14 years ago
Brian 392b42bd3f A few more README changes. 14 years ago
Brian 66f3d87e18 Fix README style issues. 14 years ago
Brian 0d593c4b0c Initial commit. 14 years ago