Platform.environment is empty inside the Android app process, so the dynamic
IMAP/SMTP port numbers exported by the test script were never visible to the
Dart test code. The test fell back to its defaults (127.0.0.1:1430/1025),
which aren't reachable inside the emulator.
Replace the export STALWART_IMAP_HOST=10.0.2.2 approach with
adb reverse tcp:1430 tcp:$STALWART_IMAP_PORT
adb reverse tcp:1025 tcp:$STALWART_SMTP_PORT
so the emulator's loopback ports 1430/1025 forward to the actual random host
ports — matching the test's hard-coded defaults exactly. Clean up the
forwarding rules in the EXIT trap.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>