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

feat: Added send email template endpoint #979

Merged
merged 1 commit into from
Aug 25, 2024

Conversation

theijhay
Copy link
Contributor

@theijhay theijhay commented Aug 25, 2024

Description

Implemented the functionality to send email templates. This includes robust error handling, retry mechanisms, and detailed logging to ensure that failures in sending emails do not disrupt the user experience. Additionally, ensured that user data is securely saved even if the email sending process fails. Unit tests were added to cover both successful and failure scenarios related to sending email templates.

Related Issue (Link to issue ticket)

Related issue

Motivation and Context

This change is required to provide a reliable mechanism for sending email templates as part of the user interaction workflow. It solves the problem of potential data loss or user experience issues caused by failures in the email sending process. By adding retries and logging, the system becomes more resilient and easier to troubleshoot in case of errors.

How Has This Been Tested?

The implementation was tested using a suite of unit tests that simulate both successful email sending and various failure scenarios (e.g., network issues, invalid email addresses). The tests ensured that errors are handled gracefully, retries are attempted as expected, and logs are generated for troubleshooting. All tests were run in a local development environment using mock services to simulate email sending.

Screenshots (if appropriate - Postman, etc):


Screenshot from 2024-08-25 07-43-57

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@joboy-dev joboy-dev merged commit d2ce65f into hngprojects:dev Aug 25, 2024
1 check passed
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