1
0
Fork 0
mirror of https://github.com/maziggy/bambuddy.git synced 2026-05-09 08:25:54 +02:00

[PR #710] [MERGED] [Fix]: Changes SMTP testing to use saved settings in the database #1103

Closed
opened 2026-05-07 00:16:01 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/maziggy/bambuddy/pull/710
Author: @shrunbr
Created: 3/15/2026
Status: Merged
Merged: 3/15/2026
Merged by: @maziggy

Base: devHead: fix/smtpTesting


📝 Commits (6)

  • 836175c Removes the need for authentication from TestSMTPRequest schema
  • 7a986d7 Removes authentication pieces from TestSMTPRequest interface
  • 0876b53 Changes test_smtp_connection to use saved SMTP settings in database
  • 720ccfc Changes test_test_smtp_connection to use SMTP settings in request
  • 8a1b1c1 Removes unneeded validation checks now that we're using saved SMTP settings from the database
  • 5fec22f Merge branch 'dev' into fix/smtpTesting

📊 Changes

5 files changed (+11 additions, -44 deletions)

View changed files

📝 backend/app/api/routes/auth.py (+4 -10)
📝 backend/app/schemas/auth.py (+0 -9)
📝 backend/tests/integration/test_advanced_auth_api.py (+6 -1)
📝 frontend/src/api/client.ts (+0 -7)
📝 frontend/src/components/EmailSettings.tsx (+1 -17)

📄 Description

Description

This updates the test SMTP functionality to use the saved settings within the database. Now this requires SMTP settings to be saved first before testing.

COPILOT GENERATED SUMMARY

This pull request updates the SMTP test email functionality to use only the saved SMTP settings from the backend, removing the ability to send arbitrary SMTP configuration via the test endpoint. As a result, the frontend, backend API, and tests have been updated to reflect this streamlined approach.

Fixes #697

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test addition or update

Changes Made

Backend API changes:

  • The /auth/smtp/test endpoint now uses only the saved SMTP settings from the database, and no longer accepts SMTP configuration in the request body. If SMTP settings are not configured, it returns an error message.
  • The TestSMTPRequest schema has been simplified to only require the test_recipient field, removing all SMTP configuration fields.

Frontend changes:

  • The TestSMTPRequest interface in client.ts has been updated to only include test_recipient, matching the backend changes.
  • The EmailSettings component no longer validates or sends SMTP configuration fields when testing the SMTP connection; it only sends the test recipient.

Testing changes:

  • Integration tests for the SMTP test endpoint now save SMTP settings before running the test, and only send the test recipient in the request.

Screenshots

image

Testing

  • I have tested this on my local machine
  • I have tested with my printer model: N/A

Checklist

  • My code follows the project's coding style
  • I have commented my code where necessary
  • I have updated the documentation (if needed)
  • My changes generate no new warnings
  • I have tested my changes thoroughly

Additional Notes

N/A


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/maziggy/bambuddy/pull/710 **Author:** [@shrunbr](https://github.com/shrunbr) **Created:** 3/15/2026 **Status:** ✅ Merged **Merged:** 3/15/2026 **Merged by:** [@maziggy](https://github.com/maziggy) **Base:** `dev` ← **Head:** `fix/smtpTesting` --- ### 📝 Commits (6) - [`836175c`](https://github.com/maziggy/bambuddy/commit/836175ca28b9273af4bf66abe592cc32a9f61513) Removes the need for authentication from TestSMTPRequest schema - [`7a986d7`](https://github.com/maziggy/bambuddy/commit/7a986d7d0c9803f3eee05156936257ea349756db) Removes authentication pieces from TestSMTPRequest interface - [`0876b53`](https://github.com/maziggy/bambuddy/commit/0876b5378938b69f226ab6b3ebc2d5caf4b16b73) Changes test_smtp_connection to use saved SMTP settings in database - [`720ccfc`](https://github.com/maziggy/bambuddy/commit/720ccfc6f806eb7b871478679eb1ba34321d186b) Changes test_test_smtp_connection to use SMTP settings in request - [`8a1b1c1`](https://github.com/maziggy/bambuddy/commit/8a1b1c1a59c6bff29c91b40a107d483dc0574e70) Removes unneeded validation checks now that we're using saved SMTP settings from the database - [`5fec22f`](https://github.com/maziggy/bambuddy/commit/5fec22fdc773bdf0a61f1d2be7ba5c2d5db28047) Merge branch 'dev' into fix/smtpTesting ### 📊 Changes **5 files changed** (+11 additions, -44 deletions) <details> <summary>View changed files</summary> 📝 `backend/app/api/routes/auth.py` (+4 -10) 📝 `backend/app/schemas/auth.py` (+0 -9) 📝 `backend/tests/integration/test_advanced_auth_api.py` (+6 -1) 📝 `frontend/src/api/client.ts` (+0 -7) 📝 `frontend/src/components/EmailSettings.tsx` (+1 -17) </details> ### 📄 Description ## Description This updates the test SMTP functionality to use the saved settings within the database. Now this requires SMTP settings to be saved first before testing. **COPILOT GENERATED SUMMARY** This pull request updates the SMTP test email functionality to use only the saved SMTP settings from the backend, removing the ability to send arbitrary SMTP configuration via the test endpoint. As a result, the frontend, backend API, and tests have been updated to reflect this streamlined approach. ## Related Issue <!-- Link to the issue this PR addresses (if applicable) --> Fixes #697 ## Type of Change <!-- Mark the relevant option with an "x" --> - [X] Bug fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [X] Test addition or update ## Changes Made Backend API changes: * The `/auth/smtp/test` endpoint now uses only the saved SMTP settings from the database, and no longer accepts SMTP configuration in the request body. If SMTP settings are not configured, it returns an error message. * The `TestSMTPRequest` schema has been simplified to only require the `test_recipient` field, removing all SMTP configuration fields. Frontend changes: * The `TestSMTPRequest` interface in `client.ts` has been updated to only include `test_recipient`, matching the backend changes. * The `EmailSettings` component no longer validates or sends SMTP configuration fields when testing the SMTP connection; it only sends the test recipient. Testing changes: * Integration tests for the SMTP test endpoint now save SMTP settings before running the test, and only send the test recipient in the request. ## Screenshots <img width="2261" height="911" alt="image" src="https://github.com/user-attachments/assets/424dbdac-31ad-4414-bb9d-dab088f6b20e" /> ## Testing - [X] I have tested this on my local machine - [X] I have tested with my printer model: N/A ## Checklist - [X] My code follows the project's coding style - [X] I have commented my code where necessary - [X] I have updated the documentation (if needed) - [X] My changes generate no new warnings - [X] I have tested my changes thoroughly ## Additional Notes N/A --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 00:16:01 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bambuddy-maziggy-1#1103
No description provided.