I have written a WordPress plugin that sends various transactional emails that I would like to track. Depending on the email, I'd like to add a different tag. I am currently using the Mailgun WordPress plugin, however, in the admin settings, the tags seem to apply to all emails sent from the site.
It seems I have to add an 'og:tag' somewhere, but I can't work out where.
$to = 'theiraddress@theirdomain.com';
$subject = 'Test';
$message = 'This is a test message';
$headers[] = 'From: My Website <myaddress@mydomain.com>';
$headers[] = 'Content-Type: text/html; charset=UTF-8';
wp_mail($to, $subject, $message, $headers)
The Mailgun library documentation says to add an array of tags to the 'og:tag' element of the message array, but the WordPress plugin doesn't seem to use the Mailgun library. Do I add the tag as a header? If so, what's the format?