Tests and Email processing