Make it possible to set a minimum time between emails.

Also fixes the missing site_name in mail.
Merge branch 'feature/send-error-email-func' into develop