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

40 utility implement account confirmation password reset emails with templates #42

Conversation

niyobern
Copy link
Collaborator

@niyobern niyobern commented May 2, 2024

Summary

This PR introduces a new feature for sending emails using the Mailgun API. The sendEmail function has been implemented in index.ts and it is exported as defaault.

Changes

  • Added a new function sendEmail in index.ts.
  • The function takes in a recipient email, confirm or reset as email types, and an object containing recipient name and link.
  • It uses the Mailgun API to send the email.
  • Error handling is also implemented to catch any errors during the API call.

Testing

  • The function has been tested with various inputs to ensure it works as expected.
  • Error scenarios were also tested to ensure errors are caught and logged.

Impact

This feature will allow us to send emails from our application. It's a crucial feature for user registration and password resets.

Additional Information

Please ensure the MAILGUN_API_KEY and MAILGUN_DOMAIN environment variables are set before using this function.

@niyobern niyobern linked an issue May 2, 2024 that may be closed by this pull request
7 tasks
@niyobern niyobern self-assigned this May 2, 2024
@niyobern niyobern added the backend Good for newcomers label May 2, 2024
@niyobern niyobern added this to the Authentication & RBAC milestone May 2, 2024
@niyobern niyobern force-pushed the 40-utility-implement-account-confirmation-password-reset-emails-with-templates branch 2 times, most recently from f90a453 to ea1a55b Compare May 3, 2024 16:20
@niyobern niyobern closed this May 3, 2024
@niyobern niyobern reopened this May 3, 2024
@niyobern niyobern force-pushed the 40-utility-implement-account-confirmation-password-reset-emails-with-templates branch from 29c862c to d1403ed Compare May 4, 2024 13:12
Copy link
Collaborator

@Habinezajanvier Habinezajanvier left a comment

Choose a reason for hiding this comment

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

👍

@Habinezajanvier Habinezajanvier merged commit 48580ce into develop May 6, 2024
5 checks passed
ambroisegithub pushed a commit that referenced this pull request May 6, 2024
…confirmation-password-reset-emails-with-templates

40 utility implement account confirmation password reset emails with templates
ambroisegithub pushed a commit that referenced this pull request May 6, 2024
…confirmation-password-reset-emails-with-templates

40 utility implement account confirmation password reset emails with templates
ambroisegithub pushed a commit that referenced this pull request May 6, 2024
…confirmation-password-reset-emails-with-templates

40 utility implement account confirmation password reset emails with templates
ambroisegithub pushed a commit that referenced this pull request May 6, 2024
…confirmation-password-reset-emails-with-templates

40 utility implement account confirmation password reset emails with templates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Utility: Implement Account Confirmation & Password Reset Emails with Templates
2 participants