Hi i want to set email template for all mails for my site . I know how to set up mail template and i set mail template for each of my mail by editing the code ie
wp_mail( $recipient, $subject, $body, $headers, $attachments );
is mail code then i replaced it with
ob_start(); require_once (get_template_directory() . '/mail-templates/contacemail.php'); $html2 = ob_get_contents(); ob_end_clean(); return wp_mail( $recipient, $subject, $html2, $headers, $attachments );
now email template is set up for this mail.[here in contacemail.php echo $body; get the content of body]
Now i need to do for all my emails rather than editing this code for indivdual mails. How to do that? Is there any hook or filter available? please help.