Sorry I guess it's confusing - you have to setEncoding before the on('data') call. Otherwise it does nothing (at least for the first call). If you don't do it, `chunk` there is a `Buffer` object, not a `String`. It "works" purely because there's an auto-conversion performed later.

Also be aware that the `chunk` there may not contain everything you need unless Qpsmtpd::Deliverable guarantees to send everything in one TCP/IP packet. You might need to get all the chunks, and concatenate together on the 'end' event. It's a hassle, but it's what needs to be done. (FWIW the "request" npm library takes care of all this crap for you, but it's a fairly large dependency).