send mail with if