Skip to content

Conversation

@badarghal
Copy link

What

Adds SMTP protocol client functions with timeouts.

Why

To send mail we need some SMTP client. However default golang implementation lacks timeouts and most libraries are either unable to just check connectivity without sending mail or do not introduce any improvement to what standard golang "net/smtp" library offers. This PR adds functions that wrap standard golang SMTP functions and adds timeouts to connections.

References

Checklist

  • Tests

@greenbonebot
Copy link
Member

Scanning the following files:

pkg/smtp/smtp.go
pkg/smtp/smtp_test.go

Scan: 'pkg/smtp/smtp.go'

Nothing detected in pkg/smtp/smtp.go
Scan took 0.00 seconds

Scan: 'pkg/smtp/smtp_test.go'

Nothing detected in pkg/smtp/smtp_test.go
Scan took 0.00 seconds

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

Conventional Commits Report

Type Number
Added 2

🚀 Conventional commits found.

@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

❌ Patch coverage is 40.27778% with 43 lines in your changes missing coverage. Please review.
✅ Project coverage is 24.39%. Comparing base (9d27c84) to head (b191dae).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
pkg/smtp/smtp.go 40.27% 28 Missing and 15 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #149      +/-   ##
==========================================
+ Coverage   22.43%   24.39%   +1.95%     
==========================================
  Files          27       28       +1     
  Lines         584      656      +72     
==========================================
+ Hits          131      160      +29     
- Misses        441      469      +28     
- Partials       12       27      +15     
Flag Coverage Δ
postgres-tests 45.11% <ø> (ø)
unit-tests 17.48% <40.27%> (+3.28%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

3 participants