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

Email refactor #364

Merged
merged 7 commits into from
Sep 19, 2023
Merged

Email refactor #364

merged 7 commits into from
Sep 19, 2023

Conversation

carolhe134
Copy link
Contributor

@carolhe134 carolhe134 commented Sep 15, 2023

What I've Done

  • In email/email.ts, I changed replaceAll to replace because replaceAll cannot be used anymore
  • I moved the email folder from the pages/api directory to the root directory for security reasons
  • For each file in email/templates folder, I moved the HTML string from Message.Body.Html.Data into the email/html folder in an HTML file with the corresponding name. See here for more info about how I did this
  • I placed the helper functions from the linked article in the email/utils.ts file
  • I updated the API calls in pages/api to use await when using the email templates
  • I updated the website to remind applicant to check spam and quarantine for emails

Current Email Folder Structure

image

Proof that the HTML content is now colorful

image

@vercel
Copy link

vercel bot commented Sep 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
witness ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 16, 2023 10:14pm

Copy link
Member

@zineanteoh zineanteoh left a comment

Choose a reason for hiding this comment

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

@carolhe134 can I just say, your PR description is 💯.
super clear and easy to understand!!
thanks for the great work!! LGTM

@zineanteoh zineanteoh merged commit 7c17552 into main Sep 19, 2023
@zineanteoh zineanteoh deleted the email-refactor branch September 19, 2023 03:18
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.

2 participants