A professional, production-grade SMTP server! No it's not. This demo project implements a very simple temporary e-mail, capable of receiving e-mails and storing them in libSQL (locally), sqld, or Turso.
Tutorial: Write your own email server in Rust
Example deployment: https://sorry.idont.date/
In order to get it to work, run it on a machine with public IP, port 25 exposed, and add all appropriate DNS entries - an MX entry and its corresponding A entry that points to the IP address where edgemail is deployed.
If you start edgemail with --api-port <port>, it also serves a JSON API on that port.
GET /inbox?inbox=<email@domain>&page=<n>returns{ mail, has_more_pages }, wheremailcontains up to 10 messages withdate,recipients,sender,subject, andid;pagedefaults to1GET /inbox/<id>returns a single message withid,date,recipients,sender,subject, andbody- after 100 API requests have been served, later requests return
503 Service Unavailable - API requests time out after 30 seconds and return
504 Gateway Timeout
edgemail has a client you can run as a static webpage. Find all the files in client/ directory. The only thing that needs to be changed is the database URL and the readonly_token used to authenticate for read-only access.