Ralph Slooten
b9f36312d7
Fix: Avoid error on image type assertion in thumbnail generation
...
Use imaging.Clone to ensure the image is always *image.NRGBA, preventing panics when decoding non-NRGBA images (e.g., JPEGs as *image.YCbCr).
2026-01-25 10:05:39 +13:00
Ralph Slooten
93088f3361
Chore: Add type assertion for value in imaging assignment
2025-11-09 11:33:51 +13:00
Ralph Slooten
5a4d13b15a
Security: Prevent integer overflow conversion to uint64
2025-07-25 20:33:27 +12:00
Ralph Slooten
2a7aa33a0a
Fix: Do not check latest release for Prometheus statistics ( #522 )
2025-07-25 20:33:20 +12:00
Ralph Slooten
e29883fa1c
Chore: Refactor API Swagger definitions and remove unused structs
...
- Removed deprecated `thumbnailParams` struct from `thumbnails.go`.
- Updated `server_test.go` to use an anonymous struct for response unmarshalling.
- Enhanced `swagger.json` with detailed definitions for SendRequest and SendMessageResponse.
- Introduced new `swaggerParams.go` to define Swagger parameters for various API endpoints.
- Created `swaggerResponses.go` to define Swagger responses for API endpoints.
- Cleaned up unused JSON error message definitions and consolidated error responses.
- Improved documentation for Chaos triggers and web UI configuration responses.
2025-06-22 15:25:22 +12:00
Ralph Slooten
f99d9ecf69
Chore: Refactor error handling and resource management across multiple files (golangci-lint)
...
- Updated error handling to use the error return value for resource closures in tests and functions, ensuring proper error reporting.
- Replaced direct calls to `Close()` with deferred functions that handle errors gracefully.
- Improved readability by using `strings.ReplaceAll` instead of `strings.Replace` for string manipulation.
- Enhanced network connection handling by adding default cases for unsupported network types.
- Updated HTTP response handling to use the appropriate status codes and error messages.
- Removed unused variables and commented-out code to clean up the codebase.
2025-06-22 15:25:21 +12:00
Ralph Slooten
4b5ce0afed
Feature: Store username with messages, auto-tag, and UI display ( #521 )
2025-06-18 16:41:04 +12:00
Ralph Slooten
fed20de522
Feature: Add relay config to preserve (keep) original Message-IDs when relaying messages ( #515 )
2025-06-07 11:38:25 +12:00
Ralph Slooten
74c6a0a434
Chore: Switch from unnecessary float64 to uint64 API values for App Information, message & attachment sizes
2025-05-20 16:51:02 +12:00
Ralph Slooten
d0716b4995
Feature: Add option to hide the "Delete all" button in web UI ( #495 )
2025-05-17 12:28:35 +12:00
Ralph Slooten
e1a6904eca
Chore: Upgrade to jhillyerd/enmime/v2
2025-05-17 00:34:29 +12:00
Ralph Slooten
1b95f2fe39
Remove breaking swagger example
2025-04-06 19:08:31 +12:00
Ralph Slooten
1400936760
Feature: Add ability to mark all search results as read ( #476 )
2025-04-06 18:11:37 +12:00
Ralph Slooten
04289091bc
Chore: Improve error message for From header parsing failure ( #477 )
2025-04-05 15:51:29 +13:00
Ralph Slooten
25671ba94f
Chore: Use Message-ID header instead of Message-Id when generating new IDs (RFC 5322)
2025-03-13 17:34:10 +13:00
Ralph Slooten
aafd2a20d9
Chore: Minor speed & memory improvements when storing messages
2025-03-01 22:51:21 +13:00
Ralph Slooten
703e981a8b
Allow limit=0 in URL parameters
2025-02-15 15:22:16 +13:00
Ralph Slooten
7c366669c7
Fix: Update Swagger JSON to prevent overflow ( #442 )
2025-02-14 16:10:54 +13:00
Ralph Slooten
61306e1ae4
Ignore render errors
2025-02-08 15:15:25 +13:00
Ralph Slooten
3528bc8da7
Fix: Add missing "latest" route to message attachment API endpoint ( #437 )
2025-02-08 08:35:37 +13:00
Ralph Slooten
cb3300212f
Fix: Remove recursive HTML regeneration in embedded HTML view ( #434 )
2025-02-07 19:39:55 +13:00
Ralph Slooten
45e67b5cac
Remove swagger example to allow validation
2025-02-05 15:36:07 +13:00
Ralph Slooten
0c63c29769
Feature: Add optional query parameter for HTML message iframe embedding ( #434 )
2025-02-05 15:25:15 +13:00
Ralph Slooten
a95bc3d29f
Feature: Option to override the From email address in SMTP relay configuration ( #414 )
2025-01-26 00:22:57 +13:00
Ralph Slooten
4d86297169
Feature: Add Chaos functionality to test integration handling of SMTP error responses ( #402 , #110 , #144 & #268 )
...
Closes #405
2025-01-25 12:17:15 +13:00
Ralph Slooten
338f205234
Use consistent swagger tag casing
2025-01-24 11:55:51 +13:00
Ralph Slooten
23fee8e4e1
Chore: Move smtpd & pop3 modules to internal
2024-12-14 17:51:02 +13:00
Ralph Slooten
3e7d4f8175
Feature: Add support for sending inline attachments via HTTP API ( #399 )
...
Optional settings for Attachment ContentID & ContentType
2024-12-05 21:25:59 +13:00
Ralph Slooten
a7fac05209
Remove swagger parameter examples (invalid format)
2024-11-09 16:51:23 +13:00
Ralph Slooten
657cada916
Chore: Add swagger examples & API code restructure
2024-11-09 13:24:20 +13:00
Ralph Slooten
31ec6681a7
Feature: Experimental Unix socket support for HTTPD & SMTPD ( #373 )
2024-10-24 23:12:34 +13:00
Ralph Slooten
7f4cd90c03
Add undocumented "demonstration mode"
2024-09-08 00:23:15 +12:00
Ralph Slooten
be1d2bcb28
Fix: Disable automatic HTML/Text character detection when charset is provided ( #348 )
2024-09-01 18:35:42 +12:00
Ralph Slooten
a1cb0af639
Feature(UI): List messages in side nav when viewing message for easy navigation ( #336 )
2024-08-04 17:04:14 +12:00
Ralph Slooten
54e0c32948
Fix(API): Return text/plain header for message delete request
2024-08-02 16:11:03 +12:00
Ralph Slooten
6947c2a621
Feature: Add optional relay recipient blocklist ( #333 )
2024-07-14 15:04:36 +12:00
Ralph Slooten
b941015632
Consolidate API tag functionality
2024-06-29 17:15:21 +12:00
Ralph Slooten
0c377b9616
Feature: Add ability to rename and delete tags globally
2024-06-29 17:12:56 +12:00
Ralph Slooten
a155b395db
Feature: Add optional label to identify Mailpit instance ( #316 )
2024-06-21 16:54:33 +12:00
Ralph Slooten
c81ea54c87
Remove redundant references to beta testing
2024-05-05 15:50:56 +12:00
Ralph Slooten
ebf7bb6348
Chore: Simplify JSON HTTP responses
2024-05-05 12:25:26 +12:00
Ralph Slooten
f424856685
Chore: JSON key case-consistency for posted API data (backwards-compatible)
2024-05-04 11:05:07 +12:00
Ralph Slooten
a15f032b32
Feature: API endpoint for sending ( #278 )
2024-05-04 10:15:30 +12:00
Ralph Slooten
cbcf0be1a2
Feature: Option to auto relay for matching recipient expression only ( #274 )
2024-04-20 23:42:36 +12:00
Ralph Slooten
96c33b1233
Chore: Auto-rotate thumbnail images based on exif data
2024-04-18 18:04:43 +12:00
Ralph Slooten
7f430d3a45
Chore: Replace disintegration/imaging with kovidgoyal/imaging to fix CVE-2023-36308
...
This also bumps the minimum Go version to 1.21.0
2024-04-14 21:53:30 +12:00
Ralph Slooten
8da8a1ad6b
Chore: Update API documentation regarding date/time searches & timezones
2024-04-14 12:36:45 +12:00
Ralph Slooten
845fe840d4
Chore: Move Link check & HTML check features out of beta
2024-04-13 00:29:23 +12:00
Ralph Slooten
31e4f84f9a
Chore: Remove deprecated --disable-html-check option
2024-04-13 00:25:48 +12:00
Ralph Slooten
a7dfbf4af0
Feature: Search support for before: and after: dates ( #252 )
2024-04-12 14:44:14 +12:00