Async POP3 client impl with Rust.
some pop3 server may not some methods list below
add tokio and mailme to dep
toml
tokio = { version = "0.3.1", features = ["io-util", "io-std", "net", "rt", "rt-multi-thread"] }
mailme = "0.1.0"
```rust use pop3::POP3Client; use tokio::runtime::Runtime;
fn main() { let rt = Runtime::new().unwrap(); rt.blockon(async { // if not tls connection, use newbasic instead let mut client = POP3Client::newtls("pop.qq.com", 995).await.unwrap(); // remember to read welcome message client.readwelcome().await.unwrap(); // login println!("{:?}", client.read_welcome().await); println!("{:?}", client.user("PrivateRookie").await); println!("{:?}", client.pass("踏遍青山人未老").await);
// do some thing
println!("{:?}", client.stat().await);
})
} ```
quit
when pop3 client drop ?