<?php
function Send_Mail($to,$subject,$body)
 {
include($_SERVER["DOCUMENT_ROOT"].'/columbofili/incs/config.inc.php');
require_once 'class.phpmailer.php';
if(!empty($set['domain'])){
$from = 'noreply@'.$set['domain'];
 }else{
    $from = 'noreply@'.$_SERVER["HTTP_HOST"];
 }
//$from = $set['mailuser'];
$mail = new PHPMailer();
$mail->IsSMTP(true);
$mail->SMTPAuth   = true;
$mail->Mailer = "smtp";
$mail->Host       = "ssl://".$set['mailhost'];
$mail->Port       = $set['mailport'];
$mail->Username   = $set['mailuser'];
$mail->Password   = $set['mailpass'];
$mail->SetFrom($from, $set['mailfrom']);
$mail->AddReplyTo($from, $set['mailuser']);
$mail->Subject = $subject;
$mail->MsgHTML($body);
$address = $to;
$mail->AddAddress($address, $to);

if(!$mail->Send())
return false;
else
return true;
 }

function Send_Maila($toa,$subjecta,$bodya)
 {
include($_SERVER["DOCUMENT_ROOT"].'/columbofili/incs/config.inc.php');
require_once 'class.phpmailer.php';
if(!empty($set['domain'])){
$from = 'noreply@'.$set['domain'];
 }else{
    $from = 'noreply@'.$_SERVER["HTTP_HOST"];
 }
$mail = new PHPMailer();
$mail->IsSMTP(true);
$mail->SMTPAuth   = true;
$mail->Mailer = "smtp";
$mail->Host       = "ssl://".$set['mailhost'];
$mail->Port       = $set['mailport'];
$mail->Username   = $set['mailuser'];
$mail->Password   = $set['mailpass'];
$mail->SetFrom($from, $set['mailfrom']);
$mail->AddReplyTo($from, $set['mailuser']);
$mail->Subject = $subjecta;
$mail->MsgHTML($bodya);
$address = $toa;
$mail->AddAddress($address, $toa);

if(!$mail->Send())
return false;
else
return true;
 }
?>