Improve error handling in example
This makes the code a bit more modular, by leaving actual error
response up to `main`, and avoids calling `std::process::exit` from a
nested scope, which would prevent destructors from running.
Switch to 2018 edition
Not much to see here, just the `extern crate` statements are gone.
To ensure code formatting stays consistent, add a CI phase "lint"
which runs `cargo fmt -- --check`.
Add example to check mail flags
Signed-off-by: Matthias Beyer <email@example.com>