andris9/Nodemailer — pull request #269 by vrodic (2014-05-14 09:36:13+00:00)
Title: bugfix (adding "-i" to sendmail command line for each new mail)  by copying this.args instead of just making a reference

We need to copy this.args instead of just making a reference because we get ane extra "-i" parameters for every mail sent because of args.unshift("-i"), like this (from my exim log):

464 args: sendmail -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i -i ....

We could probably make it more efficient by initializing "-i" in constructor for this.args and in the default args initializer ( ["-f"].concat(envelope.from).concat(envelope.to) ), but I just wanted to provide a bugfix first.