Nilhcem/FakeSMTP

Ability to read emails via API

Opened this issue · 1 comments

It would be nice to have a feature that allows the user to read the emails via some API.

This feature can be used in UI automation or end-to-end tests where the email's content can be verified.

I used to think the same, but since this project does not evolve a lot (and I don't want to make a PR to add this feature, further more seeing 17 opened PR already!), I've actually fallen back to simply read the EML file that FakeSMTP saves.
In other words, you can simply browser files in the email-saved (or so) folder where FakeSMTP stores the EML. EML parsing is pretty standard (and even pretty straightforward actually). You can also delete files from there if needed, or get the email saving date from the file name.