ModernUO/Projects/UOContent.Tests/Tests/Misc
Sergi Rosell 261ea01ab4
fix: send crash reports and bound email retries (#2680)
Crash reports never reached SMTP: `SendCrashEmail` returned immediately when email was enabled and never called the sender. It now respects the enabled setting, sends the report, and waits up to 30 seconds before the crash handler returns and the process can exit.

The sender uses the `Message-ID` generated by `MimeMessage` and the sender address already added by each caller. This removes the duplicate `Message-ID` header and duplicate address within the `From` header. Gmail rejects duplicate `Message-ID` headers: https://support.google.com/a/answer/13567860.

Email retries use a bounded doubling schedule instead of squaring an integer delay, which could overflow and throw through an `async void` method. The sender returns `Task`, uses `ConfigureAwait(false)` throughout, and logs failures. With the default five attempts and three-second initial delay, waits are 3, 6, 12, and 24 seconds. Each wait is capped at one hour, and there is no wait after the last attempt.

Validation:

- Full Release test suite on the branch updated with `main`: 2,103 passed, 2 intentionally skipped.
- Eight email test cases cover disabled-email early returns, retry timing, low attempt counts, and overflow-prone delays.
- SMTP delivery and the crash-time shutdown path are not covered by an integration test.
2026-10-04 18:41:27 -07:00
..
CorpseNotorietyTests.cs fix: player corpse notoriety ignores the owner's body at death (#2669) 2026-09-23 19:43:37 -07:00
EmailTests.cs fix: send crash reports and bound email retries (#2680) 2026-10-04 18:41:27 -07:00
GuildSerializePurityTests.cs fix: Removes side effects from locked down items, decaying houses, bracelet of binding, and builds (#2608) 2026-09-06 09:39:00 -07:00
NameVerificationTests.cs chore: Fixes name verification test (#2201) 2025-05-26 22:36:23 -07:00
ProfanityProtectionTests.cs fix: Fixes and optimizes NameVerification and ProfanityProtection (#2153) 2025-04-12 02:26:10 -07:00