Skip to content

Simplify.Mail 2.2

Latest

Choose a tag to compare

@i4004 i4004 released this 11 Jul 14:50
621eb12

Added

  • BCC recipient support on all multi-recipient overloads
  • IAntiSpamPool / AntiSpamPool extracted from MailSender with O(m) queue-based expiry and configurable max-items eviction (default 10 000) to prevent OOM
  • MailSender.DefaultAntiSpamPool static property to swap the pool implementation without constructor injection
  • Port validation in MailSenderSettings (throws ArgumentOutOfRangeException on out-of-range values)

Fixed

  • Double-checked locking in SmtpClient getter replaced with Lazy<SmtpClient>(ExecutionAndPublication) for correct thread-safety on all architectures
  • Dispose no longer disposes SemaphoreSlim while another thread may hold it; blocks until in-flight send completes, then disposes cleanly
  • CheckAntiSpamPool redundant ContainsKey check removed
  • Integration test assertions added for construction and port default

Performance

  • SendSeparately / SendSeparatelyAsync now holds the SMTP lock for the entire batch instead of per-recipient acquire/release
  • Anti-spam pool expiry uses queue-based O(m) scan instead of full O(n) dictionary enumeration