user_email; $subject = 'My Custom Email Subject'; $message = 'Hello, This is a test email sent from my WordPress plugin!'; $headers = array('Content-Type: text/html; charset=UTF-8'); $sent = wp_mail($to, $subject, $message, $headers); // Check if the email was sent successfully if (!$sent) { error_log('Email sending failed!'); } } ?>