Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit b14bf2af9d442fbfd9321595fca321c9db746dac 1 parent 4424a91
Chase Douglas authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/engines/sendmail.js
View
6 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;
Please sign in to comment.
Something went wrong with that request. Please try again.