xpepermint / smtp-client

Simple, promisified, protocol-based SMTP client for Node.js.
36 stars 13 forks source link

pass timeout to helo/ehlo in greet #20

Closed leftshift closed 2 years ago

leftshift commented 2 years ago

Right now, the timeout passed to greet is disregarded. It should instead be passed to the ehlo and helo methods.

One downside of this specific implementation is that in the worst case, a call to greet will take 2*timeout if both methods time out. Instead, something with setInterval could be implemented, but I'm not sure whether some cleanup might be required in that case.