Does not matter what terminal emulation you are using, the
^[[xx~ is used by the Mer Mail. the xx is for 17 (F6) 18 (F7) 19 (F8) 20 (F9) and 21 (F10) of the VT520. The VT100 uses F1 , F2, F3, F4 the same as F6, F7, F8, F9 of the VT320/420/520. You would have to map the F5 with the "21" to emulate the F10 key. If you map a keyboard with this reguardless of which F key used it will work with Mail