FR 8240 then FR 348 at Madrid
Porto → Madrid → London Stansted
Timetable, Madrid time
16:30FR 8240 from Porto at the gate
09:55FR 348 to London Stansted leaves the gate
17 h 25 apart on the timetable, overnight
FR 348 leaves 17 h 25 after FR 8240 arrives on the timetable: more than half a day, so not a connection we count.