Location: PHPKode > projects > web-cp - Web Hosting Control Panel > webcp/server/lib/sendmail.wcp.phps
<?	/*
	// File:	sendmail.wcp.phps
	// Purpose:	sendmail user manipulation
	// Author:	Felix <hide@address.com>
	*/


// Handle user manipulation
if ($type == "user") {
	// Create User :: expect *
	if ($data['action'] == "create") {
		
		// Handle autoreply
		if ($data['autoreply']) {
			$fp = fopen($cfg['basedir']."/autoresponder/".$data['username'],"w+");
			fwrite($fp,$data['autoreply'],10240); // limit autoreply to 10k
			fclose($fp);
		}
		
	}
	
	// Update User :: expect *
	if ($data['action'] == "update") {
		
		// Handle autoreply
		if ($data['autoreply']) {
			$fp = fopen($cfg['basedir']."/autoresponder/".$data['username'],"w+");
			fwrite($fp,$data['autoreply'],10240); // limit autoreply to 10k
			fclose($fp);
		}
		
	}
	
	// Remove User :: expect username
	if ($data['action'] == "remove") {
		
		// Remove autoreply message
		if (file_exists($cfg['basedir']."/autoresponder/".$data['username']))
			unlink($cfg['basedir']."/autoresponder/".$data['username']);
		
	}
}

?>
Return current item: web-cp - Web Hosting Control Panel