Index: /branches/amp_4_0/platform/config/init_db.sql
===================================================================
--- /branches/amp_4_0/platform/config/init_db.sql	(revision 2834)
+++ /branches/amp_4_0/platform/config/init_db.sql	(working copy)
@@ -371,18 +371,24 @@
 CREATE TABLE IF NOT EXISTS settings
 (
     id SERIAL PRIMARY KEY,
-    attribute_name varchar(64) NOT NULL,
-    attribute_value TEXT          DEFAULT NULL,
-    time TIMESTAMP   NOT NULL DEFAULT CURRENT_TIMESTAMP
+    attribute_name VARCHAR(64) NOT NULL,
+    attribute_value JSONB,
+    time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+
+    CONSTRAINT uniq_settings_attribute_name
+        UNIQUE (attribute_name)
 );
 
 CREATE TABLE IF NOT EXISTS notification
 (
-    id serial  PRIMARY KEY,
-    name varchar(64) NOT NULL,
-    type varchar(64) NOT NULL,
-    setting varchar(64)          DEFAULT NULL,
-    time        TIMESTAMP   NOT NULL DEFAULT CURRENT_TIMESTAMP
+    id SERIAL PRIMARY KEY,
+    name VARCHAR(64) NOT NULL,
+    type VARCHAR(64) NOT NULL,
+    setting JSONB NOT NULL,
+    time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+
+    CONSTRAINT uniq_notification_name_type
+        UNIQUE (name, type)
 );
 
 -- Create a adc_vs_ssl_info table
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/djproject/urls.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/djproject/urls.py	(revision 2837)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/djproject/urls.py	(working copy)
@@ -1,6 +1,7 @@
 from django.urls import re_path
 
-from hive.controller.apv_services_metrics import handle_get_top_apv_virtual_services_metrics, handle_get_top_apv_real_services_metrics, handle_get_top_llb_metrics
+from hive.controller.apv_services_metrics import handle_get_top_apv_virtual_services_metrics, \
+    handle_get_top_apv_real_services_metrics, handle_get_top_llb_metrics
 from hive.controller.devices_metrics import handle_get_top_devices_metrics, handle_get_devices_network_metrics
 from hive.router import *
 from hive.session import login_handler, logout_handler, register_complete, app_login_handler, app_logout_handler
@@ -12,7 +13,8 @@
 from hive.utils import hive_webpipe_handler, hive_webpipe_write_handler
 from hive.node import reload_app_node
 from hive.session import current_app
-from hive.composer import KibanaProxyView, elastic_proxy, reporting_downloading_handler, reporting_logo_handler, composer_config, composer_status, composer_query, composer_proxy
+from hive.composer import KibanaProxyView, elastic_proxy, reporting_downloading_handler, reporting_logo_handler, \
+    composer_config, composer_status, composer_query, composer_proxy
 from hive.storage import storage_mangement
 from hive.log_location import handle_log_location_app
 from hive.controller.device_metrics import handle_device_metrics_req
@@ -27,9 +29,10 @@
 from hive.an_opensearch import opensearch_proxy, get_opensearch_sso_token
 from hive.controller.system_metrics import handle_get_latest_system_metrics, handle_get_historical_system_metrics
 from hive.controller.generic_controller import handle_service_query_req
+from hive.controller.notification_controller import handle_notification_req
 
 js_info_dict = {
-    #'packages': ('your.app.package',),
+    # 'packages': ('your.app.package',),
 }
 
 urlpatterns = [
@@ -81,6 +84,7 @@
     re_path(r'^log/(?P<app>\w+)$', handle_log_location_app),
     re_path(r'^backup/(?P<path>.*)$', handle_backup_req),
     re_path(r'^restore/(?P<path>.*)$', handle_restore_req),
+    re_path(r'^notification/(?P<path>.*)$', handle_notification_req),
     re_path(r'^real_service$', real_service),
     re_path(r'^rs_block$', rs_block),
     re_path(r'^rs_block_import$', rs_block_import),
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/controller/notification_controller.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/controller/notification_controller.py	(nonexistent)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/controller/notification_controller.py	(working copy)
@@ -0,0 +1,121 @@
+import json
+from hive.services.notification_service import NotificationService
+from hive.model.smtp_settings import SMTPSettings
+from django.http import HttpResponse, JsonResponse
+from hive.custom_exceptions import generic_exception as ge
+
+from cm.lib.libbasic_operation import oper_log
+from hive.utils import andebug
+
+
+def handle_notification_req(request, path=None):
+    try:
+        if request.method == 'POST':
+            if path == 'smtp_setting':
+                return save_smtp_setting(request)
+            elif path == 'mail':
+                return save_email_notification(request)
+            else:
+                return JsonResponse({
+                    'error': 400,
+                    'message': "Invalid notification path"
+                }, status=400)
+        elif request.method == 'GET':
+            if path == 'smtp_setting':
+                return get_smtp_setting()
+            elif path == 'mail':
+                return get_email_notifications()
+            else:
+                return JsonResponse(
+                    {"error": "Invalid notification path"},
+                    status=400
+                )
+        else:
+            return JsonResponse({
+                'error': 400,
+                'message': "Invalid HTTP method"
+            }, status=400)
+
+    except ge.GenericError as e:
+        oper_log('error', 'system', str(e))
+        return ge.handle_exception(e)
+    except Exception as e:
+        msg = f'Exception while processing notification request., details: {str(e)}'
+        oper_log('error', 'system', msg)
+        raise ge.GenericError(500, msg)
+
+
+def save_smtp_setting(request):
+    body = json.loads(request.body)
+
+    required = ["host", "port", "user", "password", "from_address"]
+    for field in required:
+        if field not in body:
+            return JsonResponse(
+                {"error": f"{field} is required"},
+                status=400
+            )
+
+    smtp = SMTPSettings(
+        enabled=body.get("enabled", True),
+        host=body["host"],
+        port=body["port"],
+        user=body["user"],
+        password=body["password"],
+        from_address=body["from_address"],
+        from_name=body.get("from_name", "")
+    )
+
+    service = NotificationService()
+    service.save_smtp(smtp)
+
+    return JsonResponse(
+        {"status": "SMTP settings saved"},
+        status=200
+    )
+
+
+def save_email_notification(request):
+    body = json.loads(request.body)
+
+    addresses = body.get("addresses")
+    if not isinstance(addresses, list):
+        return JsonResponse(
+            {"error": "addresses must be a list"},
+            status=400
+        )
+
+    name = body.get("name", "default")
+    n_type = body.get("type", "email")
+
+    service = NotificationService()
+    service.save_email_notification(
+        name, n_type, addresses
+    )
+
+    return JsonResponse(
+        {"status": "Notification saved"},
+        status=200
+    )
+
+
+def get_smtp_setting():
+    service = NotificationService()
+    data = service.get_smtp()
+
+    return JsonResponse(
+        data,
+        safe=False,
+        status=200
+    )
+
+
+def get_email_notifications():
+    service = NotificationService()
+    data = service.get_email_notifications()
+
+    return JsonResponse(
+        data,
+        safe=False,
+        status=200
+    )
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/db/notification_repository.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/db/notification_repository.py	(nonexistent)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/db/notification_repository.py	(working copy)
@@ -0,0 +1,97 @@
+import json
+from hive.db.db_client import DBClient
+from hive.utils import andebug
+
+
+class NotificationRepository:
+
+    def insert_setting(self, name, value_json):
+        query = """
+            INSERT INTO settings (attribute_name, attribute_value)
+            VALUES (%s, %s)
+            ON CONFLICT (attribute_name)
+            DO UPDATE SET
+                attribute_value = EXCLUDED.attribute_value,
+                time = CURRENT_TIMESTAMP
+        """
+
+        req_dict = {
+            "query": query,
+            "params": [name, json.dumps(value_json)]
+        }
+
+        DBClient.execute_query(req_dict, "postgres")
+
+    def insert_notification(self, name, ntype, setting_json):
+        query = """
+            INSERT INTO notification (name, type, setting)
+            VALUES (%s, %s, %s)
+            ON CONFLICT (name, type)
+            DO UPDATE SET
+                setting = EXCLUDED.setting,
+                time = CURRENT_TIMESTAMP
+        """
+
+        req_dict = {
+            "query": query,
+            "params": [name, ntype, json.dumps(setting_json)]
+        }
+
+        DBClient.execute_query(req_dict, "postgres")
+
+    def get_setting(self, name):
+        query = """
+            SELECT attribute_value
+            FROM settings
+            WHERE attribute_name = %s
+        """
+
+        req_dict = {
+            "query": query,
+            "params": [name]
+        }
+
+        res = DBClient.execute_query(req_dict, "postgres")
+        if res.get("status") != 200:
+            raise Exception(res.get("data"))
+
+        data = res.get("data", [])
+
+        if not data:
+            return {}
+
+        value = data[0].get("attribute_value")
+
+        # psycopg2 may return JSONB as str or dict depending on config
+        if isinstance(value, str):
+            return json.loads(value)
+
+        return value
+
+    def get_notifications_by_type(self, ntype):
+        query = """
+            SELECT name, type, setting, time
+            FROM notification
+            WHERE type = %s
+            ORDER BY time DESC
+        """
+
+        req_dict = {
+            "query": query,
+            "params": [ntype]
+        }
+
+        res = DBClient.execute_query(req_dict, db="postgres")
+
+        if res.get("status") != 200:
+            raise Exception(res.get("data"))
+
+        data = res.get("data", [])
+
+        # Ensure JSONB is returned as Python dict
+        for row in data:
+            setting = row.get("setting")
+            if isinstance(setting, str):
+                row["setting"] = json.loads(setting)
+
+        return data
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/smtp_settings.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/smtp_settings.py	(nonexistent)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/smtp_settings.py	(working copy)
@@ -0,0 +1,21 @@
+class SMTPSettings:
+    def __init__(self, enabled, host, port, user, password,
+                 from_address, from_name="", cert_file="", key_file=""):
+        self.enabled = enabled
+        self.host = host
+        self.port = port
+        self.user = user
+        self.password = password
+        self.from_address = from_address
+        self.from_name = from_name
+
+    def to_json(self):
+        return {
+            "Enabled": self.enabled,
+            "Host": self.host,
+            "Port": self.port,
+            "User": self.user,
+            "Password": self.password,
+            "from_address": self.from_address,
+            "from_name": self.from_name
+        }
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/notification_service.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/notification_service.py	(nonexistent)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/notification_service.py	(working copy)
@@ -0,0 +1,34 @@
+from hive.model.smtp_settings import SMTPSettings
+from hive.db.notification_repository import NotificationRepository
+from hive.utils import andebug
+import json
+
+
+class NotificationService:
+
+    def __init__(self):
+        self.notification_repo = NotificationRepository()
+
+    def save_smtp(self, smtp_settings: SMTPSettings):
+        smtp_json = smtp_settings.to_json()
+        self.notification_repo.insert_setting("smtp", smtp_json)
+
+    def save_email_notification(self, name, n_type, addresses):
+        if not addresses:
+            raise ValueError("Email address list cannot be empty")
+
+        notification_json = {
+            "addresses": addresses
+        }
+
+        self.notification_repo.insert_notification(
+            name=name,
+            ntype=n_type,
+            setting_json=notification_json
+        )
+
+    def get_smtp(self):
+        return self.notification_repo.get_setting("smtp")
+
+    def get_email_notifications(self):
+        return self.notification_repo.get_notifications_by_type("email")
