树洞剪藏#剪藏#树洞剪藏

email-validator 批量检测Gmail/Outlook 是否被占用 | 批量验证电子邮件地址的有效性 - 资源荟萃 / 资源荟萃, Lv1 - LINUX DO

2024 年 11 月 15 日1 分钟
分享Twitter / XTelegram微博

同步来源:树洞剪藏 源站剪藏 ID:78 原文地址:https://linux.do/t/topic/257327

打开原文 · 打开源站剪藏快照


email-validator 批量检测Gmail/Outlook 是否被占用 | 批量验证电子邮件地址的有效性 - 资源荟萃 / 资源荟萃, Lv1 - LINUX DO CF worker 代码 // src/index.js v… ">

CF worker 代码 // src/index.js var src_default = { async fetch(request, env, ctx) { if (request.method === "GET") { return new Response(html, { headers: { "content-type": "text/html;charset=UTF-8" } }); } else if (request.method === "POST") { const formData = await request.formData(); const emails = formData.ge... '> CF worker 代码 // src/index.js var src_default = { async fetch(request, env, ctx) { if (request.method === "GET") { return new Response(html, { headers: { "content-type": "text/html;charset=UTF-8" } }); } else if (request.method === "POST") { const formData = await request.formData(); const emails = formData.ge... '>

跳到主要内容

话题

我的帖子

关于

友链

文档

更多

外部链接

Status

Connect

Channel

Telegram

Shared Chat

类别

开发调优

资源荟萃

文档共建

跳蚤市场

前沿快讯

福利羊毛

搞七捻三

运营反馈

深海幽域

所有类别

标签

抽奖

公告

精华神帖

快问快答

人工智能

所有标签

消息

收件箱

频道

常规频道

直接消息

聊天

真诚 、 友善 、 团结 、 专业 ,共建你我引以为荣之社区。 《常见问题解答》

email-validator 批量检测 Gmail/Outlook 是否被占用 | 批量验证电子邮件地址的有效性

资源荟萃 资源荟萃, Lv1

174

浏览量

20

1

链接

11

用户

3

阅读时间

5 分钟

11月 12 日

1 / 13

11月 12 日

返回

2 天 前

前排围观支持一下 感谢分享大佬厉害啊 有点厉害支持~~

fangyuan99 圆圆满满

2 3 天 #1

email-validator

注意,红色肯定已经被注册了,绿色大概率没被注册(小概率被注册但是不可用)

image 1206×1044 75.9 KB

数据来源: Email Validator | Site24x7 14

CF worker 代码

// src/index.js var src_default = { async fetch ( request, env, ctx ) { if (request. method === "GET" ) { return new Response (html, { headers : { "content-type" : "text/html;charset=UTF-8" } }); } else if (request. method === "POST" ) { const formData = await request. formData (); const emails = formData. get ( "emails" ). split ( " " ); const results = []; for ( const email of emails) { try { const response = await fetch ( "https://www.site24x7.com/tools/email-validator" , { headers : { accept : "/" , "accept-language" : "zh-CN,zh;q=0.9,en;q=0.8" , "content-type" : "application/x-www-form-urlencoded" , "sec-ch-ua" : '"Chromium";v="122", "Google Chrome";v="122", "Not(A:Brand";v="24"' , "sec-ch-ua-mobile" : "?0" , "sec-ch-ua-platform" : '"Windows"' , "sec-fetch-dest" : "empty" , "sec-fetch-mode" : "cors" , "sec-fetch-site" : "same-origin" , "x-requested-with" : "XMLHttpRequest" , "user-agent" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36" , Referer : "https://www.site24x7.com/tools/email-validator.html" , Origin : "https://www.site24x7.com" }, body : emails= ${ encodeURIComponent (email.trim())} , method : "POST" }); const text = await response. text (); const isValid = text. includes ( "250" ); const isInvalid = text. includes ( "550" ); results. push ({ email : email. trim (), status : isValid ? "\u5DF2\u6CE8\u518C" : isInvalid ? "\u672A\u6CE8\u518C\u6216\u90AE\u7BB1\u65E0\u6548" : "\u65E0\u6548\u90AE\u7BB1" , detail : text, timestamp : ( /* @PURE / new Date ()). toISOString () }); } catch (error) { console . error ( "Error:" , error); results. push ({ email : email. trim (), status : "\u68C0\u6D4B\u51FA\u9519" , detail : error. message , timestamp : ( / @PURE */ new Date ()). toISOString () }); } } return new Response ( JSON . stringify (results), { headers : { "content-type" : "application/json;charset=UTF-8" } }); } } }; var html = `

:root { --primary-color: #2D5A8B; --secondary-color: #6B8EB3; --accent-color: #91B6D8; --background-start: #EEF2F6; --background-end: #F5F7FA; }

body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: linear-gradient(135deg, var(--background-start), var(--background-end)); min-height: 100vh; }

.glassmorphism { background: rgba(255, 255, 255, 0.7); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border: 1px solid rgba(209, 213, 219, 0.3); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03), 0 0 0 1px rgba(255, 255, 255, 0.2) inset; }

.hover-effect { transition: all 0.3s ease; }

.hover-effect:hover { transform: translateY(-2px); box-shadow: 0 8px 12px -1px rgba(0, 0, 0, 0.08), 0 4px 6px -1px rgba(0, 0, 0, 0.05); }

.status-registered { color: #dc2626; background-color: rgba(220, 38, 38, 0.1); }

.status-unregistered { color: #059669; background-color: rgba(5, 150, 105, 0.1); }

.status-invalid { color: #059669; background-color: rgba(5, 150, 105, 0.1); }

.info-card { background: rgba(255, 255, 255, 0.8); border-left: 4px solid var(--primary-color); }

.info-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: 1000; }

.info-modal.show { display: flex; animation: fadeIn 0.3s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content { animation: slideIn 0.3s ease; }

@keyframes slideIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

相关文章