Tom - the e-mail alert is built when you post the message, so it is known that you're in a connection thread.
The code that actually posts the message doesn't need to run in a connection thread.
Your basic premise - that this is some pretty stupid code - is, however, correct. Just not for the reason you have in mind. :)