move mailer testing examples into the testing guide.

Closes #9325.

I adjusted the example and the description in the testing guide and
simply linked from the mailer to the testing guide. This way we don't
have to maintain two separate places.