The other thought I had was that I'd set up a local e-mail provider. Normally I'd be afraid of getting on an e-mail blackhole list or something, but presumably deliverability is less of an issue if you never send anything?
@LouisIngenthron Any pointer to how to do this?
@pganssle SMTP is just a text protocol over TCP. So, use whatever socket library you're comfortable with and then look up the SMTP spec. Most likely, for your use case, you can ignore all the stuff about attachments and just accept basic messages and parse their contents.
Like, the first message you have to accept is a four-char "HELO". That kind of simple.
The biggest problem you're likely to run into is many messages are encrypted into Base64, but even then, there are a ton of libraries to decode it.
@pganssle Correct. And coding up a basic SMTP receiver is actually surprisingly easy. Parsing the email for the code would be more challenging.