/****************************************************************************** * Copyright 1991-2003 by Quantum, Inc. All rights reserved. * No part of this work may be reproduced or transmitted in any * form or by any means, electronic or mechanical, including * photocopying and recording, or by any information storage * or retrieval system, except as may be expressly permitted by * the 17 U.S.C. section 101, et. seq., or in writing by * Quantum, Inc. *******************************************************************************/ /****************************************************************************** * Name: emailSetup.htm * Purpose: Setup the email server configuration * $Id: emailSetup.htm 1.35 2007/06/06 10:28:02MDT Bill Gray (bgray) dev $ *******************************************************************************/ include('common_admin_inc.htm'); class CEmail_info { var $smtpServer; var $accountName; var $accountPassword; var $senderAddress; var $snapshotOnTicket; function CEmail_info( $aSmtpSrv, $aName, $aPass, $aAddr, $aSnapshotOnTicket ) { $this->smtpServer = $aSmtpSrv; $this->accountName = $aName; $this->accountPassword = $aPass; $this->senderAddress = $aAddr; $this->snapshotOnTicket = $aSnapshotOnTicket; } }; // Handle the progress screen if opened and get the NEW data if ($_SERVER[REQUEST_METHOD] == "POST") { $operationInProgress = true; $status = new ReturnStatus(); // See if the TEST button was pressed. if( $_POST['test'] == 1 ) { error_log("Sending test email to '". $_POST['test_email'] ."'"); send_test_email($user, $_POST['test_email']); } else { $accountPassword = ""; if( $_POST['useAuth'] != '' ) { $accountName = $_POST['acctname']; $accountPassword = $_POST['acctpassword']; } $email_info = new CEmail_info( $_POST['hostname'], $accountName, $accountPassword, $_POST['email'], $_POST['snapshotOnTicket'] ); set_email_configuration($user, $email_info); } print $status->out(); return; } else { // Load stuff up for the first time $addr = get_email_configuration($user); error_log("get_email_configuration returned:" . print_r($addr,true) ); $useAuth; if(( $addr->accountName != "") ) { $useAuth = True; } else { $useAuth = False; $addr->accountName = ""; $addr->accountPassword = ""; } } ?>