Reputation: 23767
I'm using node-imap to get my Gmail e-mails and although their example runs pretty well, I'm not being able to only print the msg.To
, msg.Body
, and msg.From
. I can only print the entire message, which is a lot.
Thanks.
Upvotes: 3
Views: 1239
Reputation: 717
According to the documentation for node-imap, the To and From headers are available in the msg.headers
, which includes the To and From. In order to retrieve the body you must append a variable every time the chunk
event is emitted, and upon end
you should have a completed body. The headers will probably also not be fully available until the end
event has been triggered, so you must take that into account.
Upvotes: 3