[front-end] email logic + template change + bugfix