[TASK] Improve the mailer configuration.

- Raise delivery errors in development mode.
- Use SMTP in development and production mode.