Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR for mail support via SMTP