Using MAILTO in Cron
MAILTO at the top of a crontab controls where cron emails job output. Set MAILTO=you@example.com to receive it, or MAILTO="" to silence all mail. Either way, mail only works if a local mail transfer agent is installed.
Set the recipient
Add at the top of crontab -e:
MAILTO=you@example.com
Every job below sends its stdout/stderr to that address. Put it before the job lines.
You need an MTA
Cron hands mail to the local mailer. Without postfix, sendmail, or an ssmtp/msmtp relay configured, the mail is dropped and you get nothing even though MAILTO is set.
Turn cron email off
MAILTO="" disables mail for all following jobs. To silence one job only, redirect its output: > /dev/null 2>&1.
Prefer logs over mail
On servers, logging to a file (>> job.log 2>&1) is usually more reliable than email and avoids MTA setup entirely.
FAQ
How does MAILTO work in cron?
MAILTO=address at the top of the crontab sends every following job's output to that email. It requires a working local MTA to actually deliver.
Why am I not getting cron emails?
No mail transfer agent is configured, so cron's mail is dropped. Install/configure postfix or msmtp, or log to a file instead.
How do I stop cron from sending email?
Set MAILTO="" at the top of the crontab to silence all jobs, or redirect a single job's output to /dev/null 2>&1.