How come if you send 2 email to one person both within a second the IMAP server can mix up the order in witch the emails were sent.
It may not be the imap server. Only way to tell for sure is by comparing the full headers.
Email, when it’s sent, is not sent as a whole file. It’s sent in pieces, goes thru a mail server or two as pieces, and arrives at it’s destination in pieces. So if a piece is delayed, it will delay the whole email until the whole email can be delivered. That could be why the order gets skewed.