{"id":6,"date":"2026-07-21T14:47:00","date_gmt":"2026-07-21T14:47:00","guid":{"rendered":"https:\/\/tunichidiya.com\/?page_id=6"},"modified":"2026-07-21T15:07:00","modified_gmt":"2026-07-21T15:07:00","slug":"temp-mail","status":"publish","type":"page","link":"https:\/\/tunichidiya.com\/?page_id=6","title":{"rendered":"Temp Mail"},"content":{"rendered":"\n<script data-wp-block-html=\"js\">\n\/\/ Function definitions ko 'window' object ke sath bind kar dein:\n\nwindow.generateNewEmail = function() {\n    const domains = [\"1secmail.com\", \"1secmail.org\", \"1secmail.net\"];\n    emailDomain = domains[Math.floor(Math.random() * domains.length)];\n    emailUsername = Math.random().toString(36).substring(2, 10);\n    currentEmail = `${emailUsername}@${emailDomain}`;\n\n    document.getElementById(\"email-address\").value = currentEmail;\n    document.getElementById(\"inbox-container\").innerHTML = '<p style=\"color: #888; text-align: center;\">Waiting for incoming emails...<\/p>';\n\n    if (checkInterval) clearInterval(checkInterval);\n    checkInterval = setInterval(checkInbox, 5000);\n};\n\nwindow.copyEmail = function() {\n    const copyText = document.getElementById(\"email-address\");\n    copyText.select();\n    document.execCommand(\"copy\");\n    alert(\"Email copied: \" + copyText.value);\n};\n\nwindow.checkInbox = function() {\n    if (!emailUsername || !emailDomain) return;\n\n    fetch(`https:\/\/www.1secmail.com\/api\/v1\/?action=getMessages&login=${emailUsername}&domain=${emailDomain}`)\n        .then(response => response.json())\n        .then(messages => {\n            const container = document.getElementById(\"inbox-container\");\n            if (messages.length === 0) {\n                container.innerHTML = '<p style=\"color: #888; text-align: center;\">Waiting for incoming emails...<\/p>';\n                return;\n            }\n\n            let html = '<ul style=\"list-style: none; padding: 0; margin: 0;\">';\n            messages.forEach(msg => {\n                html += `\n                    <li style=\"padding: 10px; border-bottom: 1px solid #eee;\">\n                        <strong>From:<\/strong> ${msg.from}<br>\n                        <strong>Subject:<\/strong> ${msg.subject}<br>\n                        <small><strong>Date:<\/strong> ${msg.date}<\/small>\n                    <\/li>\n                `;\n            });\n            html += '<\/ul>';\n            container.innerHTML = html;\n        })\n        .catch(err => console.error(\"Error fetching inbox:\", err));\n};\n\n\/\/ Auto start\nwindow.generateNewEmail();\n<\/script>\n\n<div class=\"temp-mail-box\" style=\"max-width: 600px; margin: 30px auto; padding: 25px; border-radius: 12px; background: #f8f9fa; box-shadow: 0 4px 15px rgba(0,0,0,0.1); font-family: sans-serif; text-align: center;\">\n    <h2 style=\"color: #333; margin-bottom: 20px;\">Your Temporary Email Address<\/h2>\n    \n    <div style=\"display: flex; gap: 10px; justify-content: center; margin-bottom: 20px;\">\n        <input type=\"text\" id=\"email-address\" readonly value=\"Loading...\" style=\"width: 70%; padding: 12px; border: 2px solid #ddd; border-radius: 6px; font-size: 16px; font-weight: bold; color: #0073aa; text-align: center;\">\n        <button onclick=\"window.copyEmail()\" style=\"padding: 12px 20px; background: #0073aa; color: white; border: none; border-radius: 6px; cursor: pointer; font-weight: bold;\">Copy<\/button>\n    <\/div>\n\n    <button onclick=\"window.generateNewEmail()\" style=\"padding: 10px 15px; background: #6c757d; color: white; border: none; border-radius: 6px; cursor: pointer; margin-bottom: 25px;\">Refresh \/ New Email<\/button>\n\n    <hr style=\"border: 0; border-top: 1px solid #ccc; margin: 20px 0;\">\n\n    <h3 style=\"color: #444;\">Inbox<\/h3>\n    <div id=\"inbox-container\" style=\"background: white; border: 1px solid #e2e2e2; border-radius: 6px; padding: 15px; min-height: 120px; text-align: left;\">\n        <p style=\"color: #888; text-align: center;\">Waiting for incoming emails&#8230;<\/p>\n    <\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Your Temporary Email Address Copy Refresh \/ New Email Inbox Waiting for incoming emails&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-6","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/tunichidiya.com\/index.php?rest_route=\/wp\/v2\/pages\/6","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tunichidiya.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/tunichidiya.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/tunichidiya.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tunichidiya.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6"}],"version-history":[{"count":7,"href":"https:\/\/tunichidiya.com\/index.php?rest_route=\/wp\/v2\/pages\/6\/revisions"}],"predecessor-version":[{"id":19,"href":"https:\/\/tunichidiya.com\/index.php?rest_route=\/wp\/v2\/pages\/6\/revisions\/19"}],"wp:attachment":[{"href":"https:\/\/tunichidiya.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}