Fix send email, split email in two types
Put out app the emails functions