How can I set it so that cron jobs only send emails when there is an error

THanks for all the help with this.

I don't have any other problems with this pi. In fact it is only beacuse pihole -g sends an email with the update status on it that I noticed it at all.

On that note, how can I set it so that I only get emails on errors? I am using piholes inbuilt cron config for -g and -up each night.

I will have to take a look on the web and see what I can do to get systemd working properly.

This should be opened as a new thread since it's not about the OP. I will merge your comment off into a new post.

How are you having it send emails now? Send the cron file to tricorder and we can take a look.

short answer, if your email is already working:
add >/dev/null to the cron line, so, for example, the line to flush the logs should look like this:

00 00 * * * root PATH="$PATH:/usr/local/bin/" pihole flush >/dev/null

long answer, read my manual here.
to set up email, chapter 4, section 8
to suppress cron mails, chapter 13

hope this helps.