[cogenda-web] - Refactor code & add send mail sample code.