Skip to content

Instantly share code, notes, and snippets.

@devstator82
devstator82 / connections.js
Created October 5, 2011 19:42
imap connections
var util = require('util');
var sys = require('sys');
var $ = require('jquery');
var db = require('../../initializers/mongodb');
var Hashtable = require('../../lib/jshashtable');
var ImapConnection = require('imap').ImapConnection;
var Channel = db.model('Channel');
var xoauth = require('../../lib/xoauth');
@devstator82
devstator82 / gist:3158326
Created July 22, 2012 04:01
On the business of e-mail clients / Sparrow
# On the business of e-mail clients
I have been following the whole debate around this e-mail client ([Sparrow](http://sparrowmailapp.com/)) getting bought by Google. E-mail clients and the e-mail business are something close to my heart as I have once spent considerable amount of time on my own [e-mail client](http://www.inbox2.com).
People seem to be pretty upset about this acquisition because one of their favourite apps apparantly wont be updated anymore in the future, which is understandable. But lets look at this discussion from the other side: e-mail clients as a business.
Now I don't know the facts, nor do I know the good people at Sparrow. But I do know this space very well and know the facts about the space. My own Inbox2 desktop (for Windows) had about 500.000 downloads and is still being downloaded today (I stopped working on that about 2 years ago). I am assuming Sparrow did much better then this but still the essentials would remain the same.
## The facts based on my own experience
@devstator82
devstator82 / gist:3158327
Created July 22, 2012 04:01
On the business of e-mail clients / Sparrow

On the business of e-mail clients

I have been following the whole debate around this e-mail client (Sparrow) getting bought by Google. E-mail clients and the e-mail business are something close to my heart as I have once spent considerable amount of time on my own e-mail client.

People seem to be pretty upset about this acquisition because one of their favourite apps apparantly wont be updated anymore in the future, which is understandable. But lets look at this discussion from the other side: e-mail clients as a business.

Now I don't know the facts, nor do I know the good people at Sparrow. But I do know this space very well and know the facts about the space. My own Inbox2 desktop (for Windows) had about 500.000 downloads and is still being downloaded today (I stopped working on that about 2 years ago). I am assuming Sparrow did much better then this but still the essentials would remain the same.

The facts based on my own experience

// Search for reply text for messages from inbox2: ------Reply Message-----
int indexOfStartReplyText = source.IndexOf("---------- Reply message ----------");
if (indexOfStartReplyText >= 0)
return source.Substring(0, indexOfStartReplyText);
// Search for reply text for messages from GMail: <blockquote class="gmail_quote"
indexOfStartReplyText = source.IndexOf(@"<blockquote class=""gmail_quote""");
if (indexOfStartReplyText >= 0)
return source.Substring(0, indexOfStartReplyText);
+ (NSString*)authStringWithChannel:(Channel*)channel protocol:(NSString*)protocol
{
NSString* timestamp = [NSString stringWithFormat:@"%d", time(NULL)];
NSString* nonce = nil;
CFUUIDRef theUUID = CFUUIDCreate(NULL);
CFStringRef string = CFUUIDCreateString(NULL, theUUID);
nonce = [[NSString alloc] initWithFormat:@"%@", string];
CFRelease(string);
CFRelease(theUUID);