FR 5996 then AA 8594 at Madrid
London Stansted → Madrid → Palma de Mallorca
Timetable, Madrid time
19:10FR 5996 from London Stansted at the gate
16:50AA 8594 to Palma de Mallorca leaves the gate
21 h 40 apart on the timetable, overnight
AA 8594 leaves 21 h 40 after FR 5996 arrives on the timetable: more than half a day, so not a connection we count.