From 7e5ceae907c5a651bc963eb8bc048ccb9937dfa6 Mon Sep 17 00:00:00 2001 From: Andreas Knuth Date: Fri, 23 Jan 2026 16:41:44 -0600 Subject: [PATCH] updates --- .../plugins/email_config/composer.json | 2 +- .../plugins/email_config/email_config.js | 20 +++++++++++++++++++ .../plugins/email_config/email_config.php | 4 ++-- 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 DMS/docker-data/roundcube/plugins/email_config/email_config.js diff --git a/DMS/docker-data/roundcube/plugins/email_config/composer.json b/DMS/docker-data/roundcube/plugins/email_config/composer.json index 9d75386..ebd5f65 100644 --- a/DMS/docker-data/roundcube/plugins/email_config/composer.json +++ b/DMS/docker-data/roundcube/plugins/email_config/composer.json @@ -8,4 +8,4 @@ "php": ">=7.0.0", "roundcube/plugin-installer": ">=0.1.3" } -} +} \ No newline at end of file diff --git a/DMS/docker-data/roundcube/plugins/email_config/email_config.js b/DMS/docker-data/roundcube/plugins/email_config/email_config.js new file mode 100644 index 0000000..a991489 --- /dev/null +++ b/DMS/docker-data/roundcube/plugins/email_config/email_config.js @@ -0,0 +1,20 @@ +/** + * Email Configuration Plugin - Client Side + */ +if (window.rcmail) { + rcmail.addEventListener('init', function(evt) { + rcmail.register_command('email_config_open', function() { + rcmail.http_post('plugin.email_config_generate_url', {}, + rcmail.set_busy(true, 'loading')); + }, true); + }); + + rcmail.addEventListener('responseafterplugin.email_config_generate_url', function(response) { + rcmail.set_busy(false); + if (response && response.url) { + window.open(response.url, '_blank'); + } else { + rcmail.display_message('Failed to generate configuration URL', 'error'); + } + }); +} \ No newline at end of file diff --git a/DMS/docker-data/roundcube/plugins/email_config/email_config.php b/DMS/docker-data/roundcube/plugins/email_config/email_config.php index 7522257..b5a7732 100644 --- a/DMS/docker-data/roundcube/plugins/email_config/email_config.php +++ b/DMS/docker-data/roundcube/plugins/email_config/email_config.php @@ -34,7 +34,7 @@ class email_config extends rcube_plugin $rcmail = rcube::get_instance(); $email = $rcmail->user->get_username(); $secret_key = 'SHARED_SECRET_KEY_987654321'; - $config_url = 'http://localhost:3008'; + $config_url = 'https://config.email-bayarea.com'; $expires = time() + 3600; $data = $email . '|' . $expires; $signature = hash_hmac('sha256', $data, $secret_key); @@ -72,4 +72,4 @@ class email_config extends rcube_plugin return $out; } -} +} \ No newline at end of file