I have configured the SMTP and its sending email properly. I have to build a custom plugin that actually sends email notification on the certain event triggers. I am using the WP Mail SMTP plugin. I don't want to configure anything in my plugin. I just only want to extend their functionality and send emails. But I am failing to do that. I have written something like this
add_action( 'plugins_loaded', 'renderHTML' );
function renderHTML(){
$to = '[email protected]';
$subject = 'Test';
$message = "Demo Message";
$headers='';
wp_mail($to, $subject, $message, $headers);
}
Kindly help what should be the way out for this.
this is my working code