MOON
Server: Apache
System: Linux e2e-78-16.ssdcloudindia.net 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
User: imensosw (1005)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/imensosw/public_html/imenso.co/demo/individuals/postemail/emailtest.php
<?php

require '/var/www/html/individuals/postemail/example.php';
$teachers = new Teachers();


if(isset($_POST['to']) && $_POST['to']!="")
{

  $to = $_POST['to'];
  $subject = $_POST['subject'];
  $from = $_POST['from'];
  $content = $_POST['content'];

  // To send HTML mail, the Content-type header must be set
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Create email headers
 $headers .= 'From: '.$from."\r\n".
 'Reply-To: '.$from."\r\n" .
 'X-Mailer: PHP/' . phpversion();

 
    $send = $teachers->emailTest($from,$subject,$to,$content,$headers);
        
        if ($send) {
            $response = "Cancel mail sent";  
            } else {
            $response= "Not sent cancel";
        }
    
    
}

if(isset($_GET['m']))
{

$to ='mahesh.imenso@gmail.com';
  $subject ='test';
  $from ='admin@octb.co';
  $content ='hfsdifsdfsdfsd ';

  // To send HTML mail, the Content-type header must be set
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Create email headers
 $headers .= 'From: '.$from."\r\n".
 'Reply-To: '.$from."\r\n" .
 'X-Mailer: PHP/' . phpversion();

 
    $send = $teachers->emailTest($from,$subject,$to,$content,$headers);
        
        if ($send) {
            $response = "Cancel mail sent";  
            } else {
            $response= "Not sent cancel";
        }

}

?>