nodemailer / smtp-server

Create custom SMTP servers on the fly
Other
857 stars 145 forks source link

Date is not being changed #66

Closed staffanselander closed 8 years ago

staffanselander commented 8 years ago

Using

var smtpServer = new SMTPServer({
    allowInsecureAuth: true,
    authOptional: true,
    onData: function(stream, session, callback){
        stream.pipe(process.stdout);
        stream.pipe(mailparser);
        stream.on('end', callback);
    }
});

The response body's key "date" will always contain the same value. For instance When i started the server i will always get the date of first email on every email.

// Email 1 
date: Sat Sep 03 2016 12:38:23 GMT+0200 (CEST)
// Email 2
date: Sat Sep 03 2016 12:38:23 GMT+0200 (CEST)
// Email 3
date: Sat Sep 03 2016 12:38:23 GMT+0200 (CEST)
andris9 commented 8 years ago

Create a new mailparser instance for every new message