From 2d0772ac56cd77012633e2f12a6462f5527c7a15 Mon Sep 17 00:00:00 2001 From: Brian White Date: Fri, 28 Dec 2012 22:25:22 -0500 Subject: [PATCH] remove example --- README.md | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/README.md b/README.md index fe5fc64..dff805a 100644 --- a/README.md +++ b/README.md @@ -150,42 +150,6 @@ Example }); ``` -* Here is a modified version of the first example that retrieves and writes entire raw messages to files (no parsed headers): - -```javascript - // using the functions and variables already defined in the first example ... - - var fs = require('fs'), fileStream; - - openInbox(function(err, mailbox) { - if (err) die(err); - imap.search([ 'UNSEEN', ['SINCE', 'May 20, 2010'] ], function(err, results) { - if (err) die(err); - var fetch = imap.fetch(results, { - request: { - headers: false, - body: 'full' - } - }); - fetch.on('message', function(msg) { - console.log('Saw message no. ' + msg.seqno); - fileStream = fs.createWriteStream('msg-' + msg.seqno + '-raw.txt'); - msg.on('data', function(chunk) { - fileStream.write(chunk); - }); - msg.on('end', function() { - fileStream.end(); - console.log('Finished message no. ' + msg.seqno); - }); - }); - fetch.on('end', function() { - console.log('Done fetching all messages!'); - imap.logout(); - }); - }); - }); -``` - API ===