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

Update nodemailer to use patient email as recipient and add toasts when email is sent. #97

Merged
merged 2 commits into from
Sep 12, 2023

Conversation

Amanda2900
Copy link
Collaborator

Description

I changed both the request and confirmed emails to use the email provided by the patient as the recipient email instead of using the email that is being used in the local.env file for the sender. I also added a toast to display once the email is successfully sent. I adjusted the TOAST_LIMIT in use_toast.ts from 1 to 2 so that the email toast would display under the success toasts when a form is submitted or an appointment is confirmed. I did not add a toast if there is an error with the email, but I can easily do it if we would like to have that.

Related Issue

closes #79

Acceptance Criteria

Have email entered by patient be the email address be where the email is sent to instead of using the default email set up as the sender.

Type of Changes

Type
🐛 Bug fix
✨ New feature
🔨 Refactoring
💯 Add tests
🔗 Update dependencies
📜 Docs

Testing Steps / QA Criteria

To test request emails: Using one of the two new links for the appointment form (http://localhost:3000/appointment/pure-smiles-dentistry or http://localhost:3000/appointment/pearly-whites), fill out the form using a real email address where you would like to receive the email. Once the form is successfully submitted and that toast appears, another toast should appear informing you that the email was successfully sent to the email provided. An email should appear in that inbox with all the appointment details.

To test confirmation emails: Log into the appropriate admin account depending on which form you used (using either admin@admin.com or donjoe@gmail.com). Click on the appointment you just created and confirm the appointment. Once the toast appears that says if the appointment has been confirmed, another toast should appear informing you that the email was successfully sent to the email of the patient provided. An email should appear in that inbox with all the confirmed appointment details.

…nt account as the recipient email and add accompanying toasts when email is sent.
@NuriyaAkh
Copy link
Collaborator

@Amanda2900 Great work on this pull request! It's fantastic to see that everything is functioning smoothly and that the request and confirmation emails are being received successfully.
Are we considering the idea of sending a cancellation email? This email could confirm the cancellation and provide any relevant information patients might need

Copy link
Collaborator

@5hraddha 5hraddha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Amanda2900,
First of all good job in seamlessly implementing the email functionality. Its neat. 😎

There are few small stuffs that I am putting here to clean out the code (since we're looking for release soon):

  1. Remove the console.log on confirmation email:
image
  1. Update the name and details of the practice in the email sent every time (for request, scheduling and cancelling (in future)):
image

Thanks!

@mentalcaries mentalcaries merged commit 3b6f879 into main Sep 12, 2023
1 check passed
@mentalcaries mentalcaries deleted the update-email branch September 12, 2023 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move email confirmation from test to production mode
4 participants