Remove use of external tools

- Use Mail::Send instead of /usr/bin/mail (which should be the same, anyway)
- Get date via localtime