You should compile the mock email object at the start of the test (eg before the launch) but hold the object and only send it at this point.

When we write the test we always setup all the data (in the setUp funnily enough!) and then use it later during the test itself. This good practice makes the test fail sooner if there's something wrong with the support framework (eg mail server is down).