//10 seconds ago
let since = chrono::Utc::now() - chrono::Duration::seconds(10);
let sender_criteria = "FROM \"[email protected]\"";
let since_criteria = format!(
"SINCE \"{}\"",
since.format("%d-%b-%Y %H:%M:%S %z").to_string()
);
let criteria = format!("{} {}", sender_criteria, since_criteria);
println!("Criteria: {}", criteria); //passes here
println!("Searching for messages"); // passes here
let messages = imap_session
// From no-reply@imvu
.search(&criteria)
.map_err(FetchCodeError::Imap)?; //early returns response follows: "error": "Imap error: Bad Response: Could not parse command"
println!("Found {} messages", messages.len()); //Never reaches here no matter what
I am having an issue with getting TWO FA extracted from the email. Connection works it proceed to searching for messages never passes the messages instead maps and early returns the error (?);. Now am I doing something wrong in my criteria? The email is being sent from the provider, I get push notification IMAP email is correct double checked everything. It's not working. There are emails I even removed SINCE and it still does not cooperate. I have no clue what to do next. It does disregarding timezone could that be it? Any helper is appreciated!