Track an outgoing emails are very painful for developer to debug an issue.

Nowadays emails are widely used in all web app and e-commerce platforms. Either for notification or sales & marketing.

Here is a code snippet to add cc or bcc on all outgoing email from wordpress website.

Note : This hook will fire on all emails (frontend & backend) which use default wordpress function wp_mail()

View detail reference of wp_mail hook here