Permalink
Browse files

Merge pull request #111 from corp186/master

Use envelope options for sendmail transport
  • Loading branch information...
2 parents 4424a91 + b14bf2a commit 7ae622b025d6d6e7776a4d8429a11a13e57e048b @andris9 andris9 committed Oct 18, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/engines/sendmail.js
@@ -34,10 +34,8 @@ function SendmailTransport(config){
*/
SendmailTransport.prototype.sendMail = function(emailMessage, callback) {
- // sendmail strips this header line by itself
- emailMessage.options.keepBcc = true;
-
- var sendmail = spawn(this.path, ["-t"].concat(this.args));
+ var envelope = emailMessage.getEnvelope();
+ var sendmail = spawn(this.path, ["-f"].concat(envelope.from).concat(envelope.to));
sendmail.on('exit', function (code) {
var msg = "Sendmail exited with "+code;

0 comments on commit 7ae622b

Please sign in to comment.