stalwartlabs/mail-auth

mail-auth fails to build when using mail-send

Closed this issue · 1 comments

Hi, just attempting a basic hello world mail-send, but compilation always fails on mail-auth:

Compiling mail-auth v0.3.7
error[E0599]: no method named unescape_value found for struct Attribute in the current scope
--> /Users/jim/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mail-auth-0.3.7/src/report/dmarc/parse.rs:317:48
|
317 | if let Ok(attr) = attr.unescape_value() {
| ^^^^^^^^^^^^^^ help: there is a method with a similar name: decode_and_unescape_value

error[E0599]: no method named unescape_value found for struct Attribute in the current scope
--> /Users/jim/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mail-auth-0.3.7/src/report/dmarc/parse.rs:322:48
|
322 | if let Ok(attr) = attr.unescape_value() {
| ^^^^^^^^^^^^^^ help: there is a method with a similar name: decode_and_unescape_value

For more information about this error, try rustc --explain E0599.
error: could not compile mail-auth (lib) due to 2 previous errors

my basic fn:

pub async fn email_report(machines: Vec<Machine>) {
    // Build a simple multipart message
    // More examples of how to build messages available at
    // https://github.com/stalwartlabs/mail-builder/tree/main/examples
    let message = MessageBuilder::new()
        .from(("someone", "someone@example.com"))
        .to("other", "other@example.com")
        .subject("Hi!")
        .text_body("Hello world!");

    // Connect to the SMTP submissions port, upgrade to TLS and
    // authenticate using the provided credentials.
    SmtpClientBuilder::new("smtp.gmail.com", 587)
        .implicit_tls(false)
        .credentials(("someone", "p@ssw0rd"))
        .connect()
        .await
        .unwrap()
        .send(message)
        .await
        .unwrap();

}

my googling has not thrown anything useful up, hoping someone here can be more help, as I'd like to use these libraries.

Hi, please try upgrading rustc to the latest version.