Call to undefined function wp_mail
Solution provided by Tonny works for me. My code:
function your_function_name() { $to =' your@email.com'; $subject = 'The subject'; $body = 'The email body content'; $headers = array('Content-Type: text/html; charset=UTF-8'); wp_mail( $to, $subject, $body, $headers );}add_action( 'wp_loaded', 'your_function_name' );