Updated mail component template type detection

Signed-off-by: Tom Wright <tom@inflatablecookie.com>