Skip to content

Commit

Permalink
Updated example to use authenticators
Browse files Browse the repository at this point in the history
  • Loading branch information
stevestreza committed Aug 7, 2010
1 parent 1a259e8 commit 5695cc1
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions examples/example.js
@@ -1,12 +1,14 @@
var sys = require('sys');
var pop3 = require('../lib/pop3');

var client = new pop3.POPClient(110, "localhost.com", "steve", "test");
var auth = pop3.POPClient.authentication.apop("steve", "test");

var client = new pop3.POPClient(110, "localhost.com", auth);
client.addListener("authenticate", function(){
sys.puts("we have authenticated!");
client.sendAndWait(["STAT"], function(line){
sys.puts("stat: " + line);
client.disconnect();
})
})
client.connect();

setTimeout(1000, function(){
client.disconnect();
})
client.connect();

0 comments on commit 5695cc1

Please sign in to comment.