Open Lejla94 opened 3 years ago
my cargo toml
async-smtp = "0.4.0"
async-std = {version = "1.10.0", features = ["attributes"]}
The examples are not up to date with the latest version of async_smtp it looks like.
As the error suggests, the SmtpClient new
method now returns a future for a Result. So you should first await on that result, then unwrap the Result (in whatever way you'd like, for example using ?
or matching on the error) to obtain the client instance.
Now i am using tokio with lettre. But after i am good at Rust i will try this again to see what can i do.
I am using the example on github here for gmail. I get the error:
I am new to rust sorry. I tried
#[async_std::main]
but it says i should use it only on main. What could i do?