[FIX] mail: append messages at the right place

e6790ba introduced a bug where messages were always appended at the end
of the thread, potentially displaying them in the wrong order.