<?php
require_once("../config/config.php");
require_once("phpmailer/Functions.php");
if(isset($_POST))
{
$host=$_POST['host'];
if(isset($_POST['auth']))
$auth=true;
else
$auth=false;
$authusername=$_POST['authusername'];
$authupassword=$_POST['authupassword'];
$port=$_POST['port'];
$emailfrom=$_POST['emailfrom'];
$emailfromname=$_POST['emailfromname'];
$admin_email=$_POST['txt-admin-email'];
$mailMethod=$_POST['mailMethod'];
$subject="Membersite email system test email";
$body="Hello Administrator,<br/>
This is email configuration test from your membership site.<br/>
If you're receiving this message then it indicates that your email settings are successfully configured.";
$result=sendTestMail($emailfrom,$emailfromname,$admin_email,$subject,$host,$auth,$mailMethod,$authusername,$authupassword,$port,$body);
if($result)
echo "Test email sent sucessfully.";
else
echo "Email test unsuccessful using above settings.";
}
exit;
?>