Use the async library.

Also your code won't work at all because all will login with the last
username/password in the array. But switching to async.forEachSeries will
fix that.


On Sun, Mar 16, 2014 at 5:21 PM, StyleO Rubidium
<[email protected]>wrote:

> I want to get new mails with nodejs throu pop3.
>
> I want to use a for cycle, here is the source:
> http://pastebin.com/1x4RSekV The code works but sadly the result not
> really nice: http://pastebin.com/3dCeLFxM The problem is the following:
> The client.on events are running paralel not after eachother. How can I fix
> this? A want the code to connect to the seccond account after it finished
> with the first one.
>
> --
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to