colinskow / superlogin

Powerful authentication for APIs and single page apps using the CouchDB ecosystem which supports a variety of providers.
MIT License
371 stars 117 forks source link

ReplyTo config? #91

Open peteruithoven opened 8 years ago

peteruithoven commented 8 years ago

Is there a way to configure a replyto address? Using no-reply@..., which is quite common, would give a clear sign that replying to confirmation / password change E-mails won't work. Node mailer seems to support this: https://www.npmjs.com/package/nodemailer#e-mail-message-fields

I think it isn't supported yet, maybe we could add this somewhere here? https://github.com/colinskow/superlogin/blob/master/lib/mailer.js#L35

peteruithoven commented 8 years ago

I'm assuming the mailer.transport will always have to be a nodemailer-transport-... package, and I see that the options object is completely passed to the transport at creation. So mailer.transport are basically the transport options. Couldn't we also add a generic mailer.mailOptions object that we send to the sendMail function? We'd have to extend that object with individual mail specific things like to and subject, but otherwise that would make it a very generic and flexible config? If you guys think this is an idea I would like to create a pull request.