Permalink
Browse files

Use envelope information for sendmail transport

Previously, the envelope information was unused. Sendmail would
construct the envelope itself from the message headers.
  • Loading branch information...
1 parent 4424a91 commit b14bf2af9d442fbfd9321595fca321c9db746dac Chase Douglas committed Oct 17, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/engines/sendmail.js
View
@@ -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 b14bf2a

Please sign in to comment.