//------------------------------------------------------------------------------ // Licensed Materials - Property of IBM // (c) Copyright IBM Corporation 2001,2002 All Rights Reserved. // US Government Users Restricted Rights - Use, duplication or disclosure // restricted by GSA ADP Schedule Contract with IBM Corp. //------------------------------------------------------------------------------ // Outgoing Server (SMTP) Configuration - background processing // // Filename:ml_set_smtp_background_prosses.htm // // This file process the data received from the Email Notifications page actions. // // When a POST is operation result information is retrieved from POST // data and displayed in the Message Box. // // // Input: POST data // (none) // // // Ouput: POST ('form_out') // url original request page // errorCode result of operation // returnMessage text information about the operation results // // // Change History: // // Date Defect Changed By Description of Change // ---- ------ ---------- --------------------- // 11/10/2005 roomor01 File Created //------------------------------------------------------------------------------ include('common_admin_inc.htm'); include('main_inc.htm'); class EmailConfig{ var $smtpServer; var $accountName; var $accountPassword; var $senderAddress; var $snapshotOnTicket; function EmailConfig($smtpServer, $accountName, $accountPassword, $senderAddress, $sendSnapshot){ $this->smtpServer = $smtpServer; $this->accountName = $accountName; $this->accountPassword = $accountPassword; $this->senderAddress = $senderAddress; $this->snapshotOnTicket = $sendSnapshot; } } if($_SERVER[REQUEST_METHOD]=='POST'){ $accountName = ""; $accountPassword = ""; $url=$_REQUEST['url']; $auth = $_POST['authenticate']; error_log("authenticate?: ".$auth); $smtpServer = $_POST['smtp']; error_log("smtpServer= ".$smtpServer); if($auth=="true"){ $accountName = $_POST['username']; $accountPassword = $_POST['password']; }else{ $accountName = ""; $accountPassword = ""; } error_log("accountName= ".$accountName); error_log("accountPassword= ", $accountPassword); $senderAddress = $_POST['senderaddr']; error_log("senderAddress= ".$senderAddress); if ($_REQUEST['sendSnapshot'] == '0') {$sendSnapshot = 0;} else {$sendSnapshot = 1;} error_log("sendSnapshot= ".$sendSnapshot); $emailConf = new EmailConfig($smtpServer, $accountName, $accountPassword, $senderAddress, $sendSnapshot); set_email_configuration($user, $emailConf); $returnMessage = "The outgoing server (SMTP) properties have been successfully modified."; } ?>