Setting up email in WHM/cPanel is pretty straightforward for basic functionality, but getting deliverability right takes a few extra steps. First, make sure your server has a proper hostname and PTR record (reverse DNS) set up correctly - this is critical because many email servers will reject mail from servers without proper reverse DNS. You can check this in WHM under "Change Hostname" and you'll need to contact your hosting provider or data center to set up the PTR record to match your hostname. Then in WHM, go to the email configuration section and enable SPF and DKIM for all domains, which helps prove your emails are legitimate and not spoofed.
For each domain you want to send email from, you need to add the proper DNS records. Go to the DNS zone editor and make sure you have MX records pointing to your mail server, an SPF record (usually something like "v=spf1 a mx ~all"), and the DKIM record that cPanel generates for you. You can find the DKIM key in WHM under "Email Deliverability" which also checks if everything is configured correctly and gives you warnings about what's missing. Also set up DMARC records to tell other mail servers what to do if your SPF or DKIM checks fail - start with a relaxed policy like "v=DMARC1; p=none" and monitor reports before getting stricter.
The tricky part is avoiding being flagged as spam or getting your IP blacklisted. Make sure you configure rate limiting in WHM to prevent spam bots from abusing your server if a website gets compromised. Use authentication for SMTP so random people can't relay through your server. Monitor your mail queue regularly and check blacklist databases to make sure your server IP isn't listed anywhere. If you're sending any volume of email, especially marketing emails, consider using a third-party SMTP service instead because shared hosting IPs often have bad reputations already, and one compromised account on your server can get the whole IP blacklisted. Also be aware that managing a mail server takes ongoing maintenance - you need to keep an eye on logs, update software, and deal with deliverability issues, so if email isn't critical to your business it might be easier to use Google Workspace or a similar hosted solution instead.