[GitHub Issue #]
Make sure your branch name conforms to: <feature/staging/hotfix/...>/[username]/[3-4 word description separated by dashes]. Otherwise, please rename your branch and create a new PR.
Changes
What changes did you make?
Install nodemailer in root, remove emailjs-com from client
Add new API routes:
POST /email/registerOrg - send an email to the admin email address to notify about new org signup
POST /email/addUser - send an email to the newly added user containing a password reset link
Call those routes from the frontend upon successfully registering org/adding user
Closes #72
Testing
How did you confirm your changes worked?
Tested registering an org and adding a user - received emails correctly in both cases
Confirmation of Change
Upload a screenshot, if possible. Otherwise, please provide instructions on how to see the change.
Register a new org and sign in to the tsemoneta@gmail.com email account to see the first type of email
Add a new user with your email address in the tse@ucsd.edu account (in Moneta) to see the second type of email
Currently we are able to use Gmail addresses as senders by enabling the "Less secure apps" option in the Google account settings (I did this already for tsemoneta@gmail.com). However, this option will be removed on May 30. To keep using the Gmail account, we will need to use OAuth2 with Nodemailer (documentation here).
If email sending fails, the frontend displays a message saying to contact us.
If you think either of these should change, let me know and I'll address them!
Administrative Info
[GitHub Issue #] Make sure your branch name conforms to:
<feature/staging/hotfix/...>/[username]/[3-4 word description separated by dashes]
. Otherwise, please rename your branch and create a new PR.Changes
What changes did you make?
nodemailer
in root, removeemailjs-com
from clientPOST /email/registerOrg
- send an email to the admin email address to notify about new org signupPOST /email/addUser
- send an email to the newly added user containing a password reset linkTesting
How did you confirm your changes worked?
Confirmation of Change
Upload a screenshot, if possible. Otherwise, please provide instructions on how to see the change.