Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Allowed persistence of custom properties when resetting envelope state. #73

merged 1 commit into from

2 participants


When resetting the envelope state, any custom properties that may have been populated on the envelope are removed. This pull request resets only the necessary properties on the envelope - leaving any custom properties to be handled by the user's own libraries.

I haven't yet written a test for this, but I have verified it's workings in my own code. If you'd like a test set up for accepting, I'm more than happy to do so.

@andris9 andris9 merged commit 219b785 into andris9:master

1 check passed

Details default The Travis CI build passed


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/server.js
8 lib/server.js
@@ -158,7 +158,13 @@ function SMTPServerConnection(server, client){
* @param {Boolean} [keepAuthData=false] If set to true keep authentication data
SMTPServerConnection.prototype.init = function(keepAuthData){
- this.envelope = {from: "", to:[], date: new Date()};
+ if (this.envelope === undefined) {
+ this.envelope = {};
+ }
+ this.envelope.from = "";
+ = [];
+ = new Date();
if(this.hostNameAppearsAs){ = this.hostNameAppearsAs;
Something went wrong with that request. Please try again.