Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

YashBanka
Copy link

No description provided.

abhishekr700 and others added 7 commits August 11, 2025 13:55
This commit adds the remaining error handling tests for the SMTP mail sending functionality.

- Adds a test to ensure `MissingRecipientsError` is raised when no recipients are provided for an admin email.
- Adds a test to ensure `InvalidSenderError` is raised for SMTP authentication errors.
- Adds a test to ensure a generic `Error` is raised for SMTP connection errors and missing `SMTP_HOST` configuration.
- Corrects the exception type raised in the `send()` method to use the base `Error` class for transient SMTP errors.
This change prefixes all environment variables related to the external SMTP mail service with `APPENGINE_` to improve namespacing and prevent potential conflicts in the deployment environment.

The following variables have been renamed:
- USE_SMTP_MAIL_SERVICE -> APPENGINE_USE_SMTP_MAIL_SERVICE
- SMTP_HOST -> APPENGINE_SMTP_HOST
- SMTP_PORT -> APPENGINE_SMTP_PORT
- SMTP_USER -> APPENGINE_SMTP_USER
- SMTP_PASSWORD -> APPENGINE_SMTP_PASSWORD
- SMTP_USE_TLS -> APPENGINE_SMTP_USE_TLS
- ADMIN_EMAIL_RECIPIENTS -> APPENGINE_ADMIN_EMAIL_RECIPIENTS

The changes have been applied to both the SDK implementation in `mail.py` and the corresponding unit tests in `mail_unittest.py
@YashBanka YashBanka closed this Aug 25, 2025
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.

4 participants