#IMAP not working

7 messages · Page 1 of 1 (latest)

green hearth
#
    //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!

tiny wind
green hearth
tiny wind
green hearth
# tiny wind seems like it, yes

But on GO: ```go
_, err = client.Select("INBOX", false)
if err != nil {
return "", err
}
// Fetch the latest email from the INBOX folder with the UNSEEN flag and has to be from [email protected]
var msg *imap.Message
var body io.Reader
criteria := imap.NewSearchCriteria()
criteria.WithoutFlags = []string{imap.SeenFlag}
criteria.Header = textproto.MIMEHeader{
"From": []string{
"[email protected]",
},
}
tenSecondsAgo := time.Now().Add(-10 * time.Second)
// Email may not be older than 10 seconds in the past, any email that are received now and younger than 10 seconds will be allowed
criteria.Since = tenSecondsAgo
criteria.SentSince = tenSecondsAgo

This criteria does work in the 10 seconds region
#

Now that I only did date it suddenly works on Rust. but on Golang it does 10 seconds since I tested bc any emails older than 10 seconds from today are not found.

tiny wind