remove unused task
fix NullPointerException when sending email