File: /var/www/html/wavecolordrop.com/test-email.php
<?php
// Adjust this path based on your folder structure
require_once($_SERVER['DOCUMENT_ROOT'].'/wp-load.php');
$to = 'rohit.m@cccinfotech.com';
$subject = 'Mail via WordPress';
$message = '<strong>Hello!</strong> Email through wp_mail working fine ?';
$headers = array(
'Content-Type: text/html; charset=UTF-8',
'From: Website Contact <no-reply@yourdomain.com>'
);
if (wp_mail($to, $subject, $message, $headers)) {
echo 'Mail sent ??';
} else {
echo 'Mail failed ??';
}