{"id":17534,"date":"2025-02-24T04:59:30","date_gmt":"2025-02-24T04:59:30","guid":{"rendered":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/?page_id=17534"},"modified":"2025-03-17T10:18:02","modified_gmt":"2025-03-17T10:18:02","slug":"email-alert-unsubscribe","status":"publish","type":"page","link":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/en\/email-alert-unsubscribe\/","title":{"rendered":"Email Alerts Unsubscribe"},"content":{"rendered":"<div data-elementor-type=\"wp-page\" data-elementor-id=\"17534\" class=\"elementor elementor-17534\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-98192b5 e-flex e-con-boxed parallax_section_no qode_elementor_container_no e-con e-parent\" data-id=\"98192b5\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-a4b360d elementor-widget elementor-widget-heading\" data-id=\"a4b360d\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Email Alerts Unsubscribe<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ff072ab elementor-widget elementor-widget-spacer\" data-id=\"ff072ab\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-318dee5 elementor-widget elementor-widget-shortcode\" data-id=\"318dee5\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><script src=\"https:\/\/cdn.jsdelivr.net\/npm\/sweetalert2@10\"><\/script>\r\n<script src=\"https:\/\/www.google.com\/recaptcha\/api.js?onload=onloadCallback&render=explicit\" async defer><\/script>\r\n<link rel=\"stylesheet\" href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.3.0\/dist\/css\/bootstrap.min.css\">\r\n\r\n<div class=\"box-crop-from-in\">\r\n    <div class=\"justify-content-center\">\r\n        <div style=\"text-align: center;\" class=\"tex-w5\">\r\n\t\t\tWelcome to the email alert service.            <br>\r\n            <p>\r\n\t\t\t\tPlease enter your email address to cancel receiving electronic information.            <\/p>\r\n        <\/div>\r\n        <form id=\"form_email_unsub\" runat=\"server\" action=\"\">\r\n            <div class=\"crop-mail-box\">\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-12\">\r\n                        <div class=\"form-group form-group2\" style=\"text-align: left;\">\r\n                            <label>Email<span class=\"text-red\">*<\/span><\/label>\r\n                            <input class=\"form-control\" type=\"text\" name=\"email\" id=\"email\" required=\"\">\r\n                        <\/div>\r\n                    <\/div>\r\n                    <div class=\"col-lg-12\">\r\n\t\t\t\t\t\t<div id=\"recaptcha\"><\/div>\r\n                        <div class=\"box-sub-sub2 text-center\">\r\n                           <button type=\"button\" id=\"unsubscribe\" onclick=\"submitUnSubscription()\">Unsubscribe<\/button>\r\n                        <\/div>\r\n                    <\/div>\r\n                <\/div>\r\n            <\/div>\r\n        <input type=\"hidden\" name=\"trp-form-language\" value=\"en\"\/><\/form>\r\n\t\t \r\n    <\/div>\r\n<\/div>\r\n<input type=\"text\" name=\"listed_id\" id=\"listed_id\" style=\"display: none;\" autocomplete=\"off\" value=\"1198\">\r\n\r\n\r\n<script>\r\n    var widgetId1;\r\n    \r\n   function onloadCallback() {\r\n        widgetId1 = grecaptcha.render('recaptcha', {\r\n            'sitekey': sitekey,  \r\n            'callback': verifyCallback,\r\n            'theme': 'light'\r\n        });\r\n    }\r\n\r\n    function verifyCallback(response) {\r\n        if (!response) {\r\n            console.error(\"reCAPTCHA response is empty!\");\r\n            return;\r\n        }\r\n        console.log(\"reCAPTCHA verified:\", response);\r\n    }\r\n\r\n   function checkcaptcha() {\r\n    const response = grecaptcha.getResponse(widgetId1);\r\n    if (!response) {\r\n        showAlert('error', \"Please complete the reCAPTCHA.\");\r\n        return false;\r\n    }\r\n    return true;\r\n}\r\n\r\n\r\n    function validateEmail(email) {\r\n        const re = \/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$\/;\r\n        return re.test(String(email).toLowerCase());\r\n    }\r\n\r\n    function showAlert(icon, title, timer = 2500) {\r\n        Swal.fire({\r\n            position: 'center',\r\n            icon: icon,\r\n            title: title,\r\n            showConfirmButton: false,\r\n            timer: timer\r\n        });\r\n    }\r\n\r\n    async function submitUnSubscription() {\r\n        const email = document.getElementById(\"email\").value;\r\n       \r\n        if (!checkcaptcha()) return;\r\n        if (!email) return showAlert('error', \"Please enter your email.\");\r\n        if (!validateEmail(email)) return showAlert('error', \"The email is incorrect. Please re-enter your email.\");\r\n\r\n        const payload = {\r\n            listed_id: LISTED_ID,\r\n            email: email,\r\n            language: \"th\"\r\n        };\r\n\r\n       Swal.fire({\r\n    title: \"Processing...\",\r\n    text: \"Please wait\",\r\n    allowOutsideClick: false,\r\n    showConfirmButton: false,\r\n    didOpen: () => {\r\n        Swal.showLoading();\r\n    }\r\n});\r\n\r\n\r\n        try {\r\n            const response = await fetch(API_IRPLUS_LINK + 'UnSubscribeEmailAlert', {\r\n                method: 'POST',\r\n                headers: {\r\n                    'Content-Type': 'application\/json',\r\n                    'Authorization': authToken\r\n                },\r\n                body: JSON.stringify(payload)\r\n            });\r\n\r\n            let result;\r\n            try {\r\n                result = await response.json();\r\n            } catch (err) {\r\n                console.error(\"Invalid JSON response:\", err);\r\n                return showAlert(\"error\", \"Invalid response from server.\");\r\n            }\r\n\r\n            if (response.ok) {\r\n                Swal.fire({\r\n                    position: 'center',\r\n                    icon: 'success',\r\n                    title: \"Unsubscription successful!\",\r\n                    showConfirmButton: false,\r\n\t\t\t\t\ttimer: 2500\r\n\t\t\t\t}).then(() => {\r\n\t\t\t\t\tlocation.reload(); \/\/ \u0e23\u0e35\u0e40\u0e1f\u0e23\u0e0a\u0e2b\u0e19\u0e49\u0e32\u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01 Swal \u0e1b\u0e34\u0e14\r\n\t\t\t\t});\r\n            } else {\r\n                showAlert(\"error\", result.message || \"Something went wrong. Please try again.\");\r\n            }\r\n        } catch (error) {\r\n            showAlert(\"error\", \"Network Error. Unable to connect to the server.\");\r\n        }\r\n    }\r\n<\/script>\r\n\r\n<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-acc1759 e-flex e-con-boxed parallax_section_no qode_elementor_container_no e-con e-parent\" data-id=\"acc1759\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-379212e elementor-widget elementor-widget-html\" data-id=\"379212e\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<style>\n        .content .container .container_inner.default_template_holder, .content .container .container_inner.page_container_inner {\n        width: 100%;\n    }\n    #recaptcha{\n    justify-content: center;\n    display: flex;\n    margin: 30px auto;\n    }\n    .content{\n    margin-top: 0px;\n    }\n<\/style>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>Email Alerts Unsubscribe<\/p>","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-17534","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01\u0e2d\u0e35\u0e40\u0e21\u0e25\u0e23\u0e31\u0e1a\u0e02\u0e48\u0e32\u0e27\u0e2a\u0e32\u0e23 - LDC Dental PCL<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01\u0e2d\u0e35\u0e40\u0e21\u0e25\u0e23\u0e31\u0e1a\u0e02\u0e48\u0e32\u0e27\u0e2a\u0e32\u0e23 - LDC Dental PCL\" \/>\n<meta property=\"og:description\" content=\"\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01\u0e2d\u0e35\u0e40\u0e21\u0e25\u0e23\u0e31\u0e1a\u0e02\u0e48\u0e32\u0e27\u0e2a\u0e32\u0e23\" \/>\n<meta property=\"og:url\" content=\"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/en\/email-alert-unsubscribe\/\" \/>\n<meta property=\"og:site_name\" content=\"LDC Dental PCL\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/LDCDental\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-17T10:18:02+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@LDC_Dental\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/email-alert-unsubscribe\/\",\"url\":\"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/email-alert-unsubscribe\/\",\"name\":\"\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01\u0e2d\u0e35\u0e40\u0e21\u0e25\u0e23\u0e31\u0e1a\u0e02\u0e48\u0e32\u0e27\u0e2a\u0e32\u0e23 - LDC Dental PCL\",\"isPartOf\":{\"@id\":\"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/#website\"},\"datePublished\":\"2025-02-24T04:59:30+00:00\",\"dateModified\":\"2025-03-17T10:18:02+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/email-alert-unsubscribe\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/email-alert-unsubscribe\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/email-alert-unsubscribe\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01\u0e2d\u0e35\u0e40\u0e21\u0e25\u0e23\u0e31\u0e1a\u0e02\u0e48\u0e32\u0e27\u0e2a\u0e32\u0e23\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/#website\",\"url\":\"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/\",\"name\":\"My WordPress\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/#organization\",\"name\":\"My WordPress\",\"url\":\"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/wp-content\/uploads\/2025\/04\/logo-LDC-02.webp\",\"contentUrl\":\"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/wp-content\/uploads\/2025\/04\/logo-LDC-02.webp\",\"width\":150,\"height\":39,\"caption\":\"My WordPress\"},\"image\":{\"@id\":\"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/LDCDental\",\"https:\/\/x.com\/LDC_Dental\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01\u0e2d\u0e35\u0e40\u0e21\u0e25\u0e23\u0e31\u0e1a\u0e02\u0e48\u0e32\u0e27\u0e2a\u0e32\u0e23 - LDC Dental PCL","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01\u0e2d\u0e35\u0e40\u0e21\u0e25\u0e23\u0e31\u0e1a\u0e02\u0e48\u0e32\u0e27\u0e2a\u0e32\u0e23 - LDC Dental PCL","og_description":"\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01\u0e2d\u0e35\u0e40\u0e21\u0e25\u0e23\u0e31\u0e1a\u0e02\u0e48\u0e32\u0e27\u0e2a\u0e32\u0e23","og_url":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/en\/email-alert-unsubscribe\/","og_site_name":"LDC Dental PCL","article_publisher":"https:\/\/www.facebook.com\/LDCDental","article_modified_time":"2025-03-17T10:18:02+00:00","twitter_card":"summary_large_image","twitter_site":"@LDC_Dental","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/email-alert-unsubscribe\/","url":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/email-alert-unsubscribe\/","name":"\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01\u0e2d\u0e35\u0e40\u0e21\u0e25\u0e23\u0e31\u0e1a\u0e02\u0e48\u0e32\u0e27\u0e2a\u0e32\u0e23 - LDC Dental PCL","isPartOf":{"@id":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/#website"},"datePublished":"2025-02-24T04:59:30+00:00","dateModified":"2025-03-17T10:18:02+00:00","breadcrumb":{"@id":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/email-alert-unsubscribe\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/email-alert-unsubscribe\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/email-alert-unsubscribe\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/"},{"@type":"ListItem","position":2,"name":"\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01\u0e2d\u0e35\u0e40\u0e21\u0e25\u0e23\u0e31\u0e1a\u0e02\u0e48\u0e32\u0e27\u0e2a\u0e32\u0e23"}]},{"@type":"WebSite","@id":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/#website","url":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/","name":"My WordPress","description":"","publisher":{"@id":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/#organization","name":"My WordPress","url":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/#\/schema\/logo\/image\/","url":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/wp-content\/uploads\/2025\/04\/logo-LDC-02.webp","contentUrl":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/wp-content\/uploads\/2025\/04\/logo-LDC-02.webp","width":150,"height":39,"caption":"My WordPress"},"image":{"@id":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/LDCDental","https:\/\/x.com\/LDC_Dental"]}]}},"_links":{"self":[{"href":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/en\/wp-json\/wp\/v2\/pages\/17534","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/en\/wp-json\/wp\/v2\/comments?post=17534"}],"version-history":[{"count":23,"href":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/en\/wp-json\/wp\/v2\/pages\/17534\/revisions"}],"predecessor-version":[{"id":19333,"href":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/en\/wp-json\/wp\/v2\/pages\/17534\/revisions\/19333"}],"wp:attachment":[{"href":"https:\/\/aliceblue-flamingo-311157-clone.irpluscontent.com\/en\/wp-json\/wp\/v2\/media?parent=17534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}