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";
}
}
?>