Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mail-auth fails to build when using mail-send #26

Open
jimmer74 opened this issue Jan 31, 2024 · 1 comment
Open

mail-auth fails to build when using mail-send #26

jimmer74 opened this issue Jan 31, 2024 · 1 comment

Comments

@jimmer74
Copy link

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.

@mdecimus
Copy link
Member

mdecimus commented Feb 5, 2024

Hi, please try upgrading rustc to the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants