Use custom template in wp_mail() in function.php
1 2 3 4 5 6 | $template = file_get_contents(get_template_directory_uri().'/email-template/subscribe.php', true); $to = $email; $subject = 'Cody Paste - Subscription'; $body = $template; $headers = array('Content-Type: text/html; charset=UTF-8'); wp_mail( $to, $subject, $body, $headers ); |