<?php
//DB Data
include '../../ASEngine/AS.php';
if(!$login->isLoggedIn())
    header("Location: ../../login.php");
$user = new ASUser(ASSession::get("user_id"));
$userInfo = $user->getInfo();

//basic include files
require_once("../../../db.php");

//Variables Post
$defaultemail = $_POST['defaultemail'];
$webname = $_POST['webname'];
$replymail = $_POST['replymail'];
$fromail = $_POST['fromail'];


mysqli_query($conn, "UPDATE email_recipients SET email_address = '$defaultemail', site_name = '$webname', reply_email = '$replymail', from_email = '$fromail' WHERE id = 1");

mysqli_close($conn);

header("Location: ../../mailerconfig.php?emailtemplatemsn=update1");
?>