Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[node] Add email to the backend #7

Open
bruderstein opened this issue Mar 10, 2017 · 0 comments
Open

[node] Add email to the backend #7

bruderstein opened this issue Mar 10, 2017 · 0 comments

Comments

@bruderstein
Copy link
Owner

Add an email library to the backend. You can assume there is a reliable SMTP server running locally to deal with retries etc, so you can just fire and forget.

It would be useful to have a sendEmail function wrapped up for other parts of the application to use. The configuration should come from the existing config setup.

It would be nice anywhere in the application to be able to do:

sendEmail({
  to: 'test@example.com',
  subject: 'Validate your email address',
  text: 'Please validate your email by following this link: ' + validationLink,
  html: htmlVersionOfTheEmail
});

This function should ideally return a promise that resolves when the email has been sent, or rejects if it fails.

The from should come from config. As the SMTP server will be local, there's no need to have SSL etc, just a plain ordinary SMTP server connection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant