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

POP3 retrieval errors after failure #20

Open
ttcc-gh opened this issue Nov 18, 2020 · 0 comments
Open

POP3 retrieval errors after failure #20

ttcc-gh opened this issue Nov 18, 2020 · 0 comments

Comments

@ttcc-gh
Copy link

ttcc-gh commented Nov 18, 2020

Hi,
I just tried to retrieve some mails in a loop, knowing that message #44 is not formatted correctly according to RFC (Spam message contains un-encoded binary data) and so, must run into error:

Example:

for i in 43..49 {
        let message = pop3.retr(i);
        let _eml = match message {
            POP3Message { raw: _ } => println!("{} ->  OK", i),
            _ => {  println!("{} -> ERR", i)
            }
        };

Result

43 ->  OK
44 -> ERR
45 -> ERR
46 -> ERR
47 -> ERR
48 -> ERR

Omitting message #44 in this loop by adding if i == 44 { continue } before pop3.retr results in correct output:

43 ->  OK
45 ->  OK
46 ->  OK
47 ->  OK
48 ->  OK

Any ideas what´s going wrong here? Did I miss something?

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

1 participant