Implement emails notifications and some corrections

The emails still need a kind of "templating engine".
Correct some bugs that return on phpunit testing
Semi implementing template system for mail sending
Clean and set functionnal for push