Kiran2
(Kiran)
February 26, 2026, 11:48pm
1
I’m Kirandeep, interested in contributing to Jenkins for GSoC 2026.
I recently opened a small PR in the email-ext plugin improving SMTP host and port validation with descriptor checks and unit tests:
main ← wisekiran:improve-smtp-validation
opened 11:13PM - 26 Feb 26 UTC
### Summary
This PR improves validation for SMTP host and port fields in the … `MailAccount` descriptor.
Changes include:
- Added backend validation to ensure SMTP port is numeric and within the valid range (1–65535)
- Added basic validation to prevent invalid SMTP host values (e.g., containing spaces)
- Added unit tests to verify validation behavior
This change improves configuration UX and adds defensive validation without altering existing email sending behavior.
---
### Testing done
**Automated testing**
- Added unit tests covering:
- Non-numeric SMTP port
- Out-of-range SMTP port
- Valid SMTP port
- Invalid SMTP host containing spaces
- Valid SMTP host
- Verified `mvn clean install` completes successfully.
**Manual testing**
- Ran Jenkins locally using `mvn hpi:run`
- Verified validation messages appear correctly in the UI
- Confirmed valid values save successfully
- Confirmed existing email sending behavior remains unchanged
---
### UI Before
<img width="3785" height="1760" alt="image" src="https://github.com/user-attachments/assets/7dfed140-c808-4629-a8a8-05ac13cc4bc8" />
### UI After
<img width="3793" height="1759" alt="image" src="https://github.com/user-attachments/assets/379243dd-6ad1-45e7-83a2-8db01e81efcd" />
---
### Submitter checklist
- [x] Make sure you are opening from a **topic/feature/bugfix branch**
- [x] Ensure that the pull request title represents the desired changelog entry
- [x] Please describe what you did
- [ ] Link to relevant issues in GitHub or Jira (no existing issue; UX improvement)
- [ ] Link to relevant pull requests
- [x] Ensure you have provided tests that demonstrate the feature works
I’m exploring the “Jenkins email notifications using Outlook SMTP with OAuth” idea and would appreciate any guidance on how best to approach the OAuth design within the existing plugin.
@krisstern would value your thoughts when you have time.
Looking forward to contributing further.