This solution is from an era, where MimeKit was not a standard yet in .NET and mostly System.Net.Mail was used.
There were 2 things we had to solve:
- embedding pictures into the email (not as attachments but as a viewable part of the HTML body
- and enforcing security (which required the switch to
MimeKitasSystem.Net.Mailsupports connections on port 587 (default port for Explicit SSL that starts unencrypted then issues aSTARTTLSthen switches to an Encrypted connection: RFC 2228, but doesn't support Implicit SSL (entire connection is wrapped in an SSL layer...
...both of them are addressed inside this solution
NOTE: back then AngleSharp wasn't available yet (it's a 2013 project, while MimeKit is from 2012) so for some HTML parsing I've used RegEx plus assumed XML/XHTML document and used XmlDocument for parsing...