Permalink
Browse files

Allowed persistence of custom properties when resetting envelope state.

  • Loading branch information...
1 parent 4bb8383 commit b49b7ead18acc84584f806eda2bc04166320ec9e @garbetjie garbetjie committed Feb 19, 2014
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/server.js
View
@@ -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 = "";
+ this.envelope.to = [];
+ this.envelope.date = new Date();
if(this.hostNameAppearsAs){
this.envelope.host = this.hostNameAppearsAs;

0 comments on commit b49b7ea

Please sign in to comment.