Skip to content

Make emails easily accessible in dev environment #231

@patcon

Description

@patcon

Right now, emails get sent out for password reset, and for data exports, and perhaps others things. For the latter, it's after some processing in the math component, which calls back to server to send email afterwards.

It would be great if email bodies/metadata could be inspected during development without trying to send a real email via Mailgun SaaS (currently the only way to send).

An alternative approach would be to try to send it via postfix, but printing to logs seems simplest.

I think this is where this would need to be added:
https://github.com/pol-is/polisServer/blob/806e77e508cd8c27a8c372502c111359fdd8b28e/email/sendEmailSesMailgun.js#L63-L73

Off the top of my head, this could be enabled in one of two ways:

  1. setting devMode to true, and always printing to logs when in this mode, or
  2. added a config like emailServer which could be one of logs or mailgun (or some future SaaS)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions