landing-OL30yro5.js 16 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import"./modulepreload-polyfill-Dezn_h7o.js";var e=`mailhub-landing-locale`,t=[`zh-CN`,`en-US`],n={"zh-CN":{"nav.features":`功能`,"nav.integrate":`接入`,"nav.quickstart":`使用说明`,"nav.api":`API`,"nav.mailboxes":`邮箱`,"nav.domains":`域名配置`,"nav.smtp":`SMTP`,"nav.webhooks":`Webhooks`,"cta.login":`登录`,"cta.signup":`开始使用`,"cta.viewApi":`查看 API 示例`,"cta.github":`GitHub`,"common.copy":`复制`,"common.copied":`已复制`,"hero.eyebrow":`事务邮件平台`,"hero.title":`用 API 与 SMTP 发送可靠的事务邮件`,"hero.lede":`自托管 MailHub 提供域名 DNS 引导、DKIM 签名、投递日志与签名 Webhook —— 无需被黑盒 SaaS 锁定。`,"hero.curl":`curl -X POST https://mail.example.com/api/send \\
  2. -H 'Authorization: Bearer <USER_API_TOKEN>' \\
  3. -H 'Content-Type: application/json' \\
  4. -d '{
  5. "from": "noreply@example.com",
  6. "to": "user@example.com",
  7. "subject": "Hello from MailHub",
  8. "text": "Signed with DKIM and queued by MailHub."
  9. }'`,"trust.selfHosted":`自托管`,"trust.webhooks":`投递 Webhooks`,"features.title":`为生产发信而设计`,"features.sub":`完成域名认证、发送与可观测所需的关键能力。`,"features.dns.title":`域名与 DNS`,"features.dns.body":`SPF / DKIM / DMARC 引导,支持 DNS 服务商一键写入。`,"features.smtp.title":`SMTP Submission`,"features.smtp.body":`面向应用的 SMTP 接入,凭据由你掌控。`,"features.api.title":`HTTP 发送 API`,"features.api.body":`Bearer Token + 简洁 JSON 发送接口,适合服务端集成。`,"features.mailboxes.title":`邮箱与收信`,"features.mailboxes.body":`创建长期或到期邮箱,支持 IMAP、POP3、转发和未知地址收取。`,"features.logs.title":`投递日志`,"features.logs.body":`跟踪入队与 MTA 结果,支持检索发送历史。`,"features.hooks.title":`Webhooks`,"features.hooks.body":`对已送达 / 退信 / 失败终态事件进行签名回调。`,"features.multi.title":`多用户隔离`,"features.multi.body":`域名、Token 与日志按账号隔离。`,"integrate.title":`三种接入方式`,"integrate.sub":`选择适合你技术栈的路径 —— 注册登录后完成配置。`,"integrate.api.title":`API`,"integrate.api.body":`创建 API Token,使用 Bearer 认证 POST JSON 到 /api/send。`,"integrate.api.link":`查看 API 示例 →`,"integrate.smtp.title":`SMTP`,"integrate.smtp.body":`将应用指向 MailHub Submission 端口,使用独立登录凭据。`,"integrate.smtp.link":`查看 SMTP 说明 →`,"integrate.hooks.title":`Webhooks`,"integrate.hooks.body":`为终态投递事件订阅端点,校验 HMAC 签名。`,"integrate.hooks.link":`查看 Webhook 事件 →`,"quickstart.title":`四步开始使用`,"quickstart.sub":`在同一个控制台完成域名、Token、邮箱和投递配置。`,"quickstart.domain.title":`添加域名`,"quickstart.domain.body":`添加发信域名,并发布 MailHub 展示的 DNS 记录。`,"quickstart.domain.link":`查看域名配置 →`,"quickstart.token.title":`创建最小权限 Token`,"quickstart.token.body":`只为每个接入授予所需的发信或邮箱权限。`,"quickstart.token.link":`查看 API 权限 →`,"quickstart.mailbox.title":`创建邮箱`,"quickstart.mailbox.body":`可在控制台创建长期邮箱,也可通过 API 创建长期或临时邮箱。`,"quickstart.mailbox.link":`查看邮箱 API →`,"quickstart.client.title":`接入客户端`,"quickstart.client.body":`使用 SMTP 发信,用 IMAP 或 POP3 收信,均使用完整邮箱地址和密码。`,"quickstart.client.link":`查看协议配置 →`,"api.title":`发送 API`,"api.sub":`最小 JSON 契约。下列主机名为占位符,请替换为你的 MailHub 地址。`,"api.curl":`curl -X POST https://mail.example.com/api/send \\
  10. -H 'Authorization: Bearer <USER_API_TOKEN>' \\
  11. -H 'Content-Type: application/json' \\
  12. -d '{
  13. "from": "noreply@example.com",
  14. "to": "user@example.com",
  15. "subject": "Hello from MailHub",
  16. "text": "Signed with DKIM and queued by MailHub."
  17. }'`,"api.field.from":`已验证域名上的发件地址`,"api.field.to":`收件人字符串或数组`,"api.field.subject":`邮件主题`,"api.field.body":`纯文本或 HTML 正文`,"mailboxes.title":`邮箱 API 与客户端接入`,"mailboxes.sub":`为持续使用创建长期邮箱;为短流程创建可自动过期的临时邮箱。`,"mailboxes.api.title":`创建邮箱`,"mailboxes.api.body":`使用拥有 mailboxes:write 权限的 Token 调用 POST /api/mailboxes,目标域名必须属于该账号。`,"mailboxes.api.mode":`permanent 或 temporary`,"mailboxes.api.address":`传入完整邮箱,或只传 domain 让临时邮箱自动生成地址`,"mailboxes.api.expires":`临时邮箱必填,范围为 5 分钟到 30 天`,"mailboxes.api.password":`可选;不传时会仅在创建响应中返回安全密码`,"mailboxes.client.title":`使用返回的客户端配置`,"mailboxes.client.body":`创建响应包含邮箱地址、密码、到期时间,以及可直接使用的 IMAP、POP3、SMTP 配置。`,"mailboxes.client.imap":`推荐,支持同步文件夹与已发送邮件`,"mailboxes.client.pop3":`适合下载到本地的客户端`,"mailboxes.client.smtp":`发信时同样使用完整邮箱地址和密码`,"mailboxes.curl":`curl -X POST https://mail.example.com/api/mailboxes \\
  18. -H 'Authorization: Bearer <MAILBOX_API_TOKEN>' \\
  19. -H 'Content-Type: application/json' \\
  20. -d '{
  21. "mode": "temporary",
  22. "domain": "example.com",
  23. "expiresInMinutes": 60
  24. }'`,"mailboxes.note":`使用带有 mailboxes:read 权限的 GET /api/mailboxes 查询该账号的邮箱。临时邮箱到期后会停止收信与认证。`,"domainsDoc.title":`域名配置`,"domainsDoc.sub":`先在 MailHub 中添加域名。控制台 DNS 面板展示的验证、DKIM、SPF、DMARC 与发信主机值是该域名的最终准则。`,"domainsDoc.col.purpose":`用途`,"domainsDoc.col.record":`记录`,"domainsDoc.col.requirement":`要求`,"domainsDoc.row.verify":`域名归属验证`,"domainsDoc.row.verifyValue":`发布控制台生成的验证值。`,"domainsDoc.row.dkim":`发布该域名生成的公钥。`,"domainsDoc.row.spf":`仅保留一条 SPF,并包含 MailHub 要求的发信 IP/主机。`,"domainsDoc.row.dmarc":`先以监控策略开始,确认对齐后再逐步增强策略。`,"domainsDoc.row.mx":`收信`,"domainsDoc.row.mxValue":`MX 指向 MailHub 收信主机,并确保该主机存在 A/AAAA 记录。`,"domainsDoc.note":`为提高投递可靠性,还需将发信 IP 的 PTR 配置为 MailHub 发信主机名,并在防火墙放行文档所列 SMTP、IMAP、POP3 端口。`,"smtp.title":`SMTP Submission`,"smtp.sub":`默认监听端口(部署时可覆盖):`,"smtp.note":`SMTP、IMAP、POP3 均使用完整邮箱地址和密码。优先使用 465、993、995 TLS 端口;必要时在普通端口启用 STARTTLS/STLS。`,"webhooks.title":`投递 Webhooks`,"webhooks.sub":`仅终态事件 —— 向你的系统发送签名 HTTPS 回调。`,"webhooks.col.status":`状态`,"webhooks.col.type":`type`,"webhooks.sig":`签名请求头:`,"ctaBand.title":`准备好发送了吗?`,"ctaBand.sub":`创建账号、添加域名,几分钟内发出第一封邮件。`,"footer.tag":`自托管邮件投递控制平面`},"en-US":{"nav.features":`Features`,"nav.integrate":`Integrate`,"nav.quickstart":`Quick start`,"nav.api":`API`,"nav.mailboxes":`Mailboxes`,"nav.domains":`Domain setup`,"nav.smtp":`SMTP`,"nav.webhooks":`Webhooks`,"cta.login":`Log in`,"cta.signup":`Get started`,"cta.viewApi":`View API sample`,"cta.github":`GitHub`,"common.copy":`Copy`,"common.copied":`Copied`,"hero.eyebrow":`Transactional email platform`,"hero.title":`Send reliable email via API & SMTP`,"hero.lede":`Self-hosted MailHub gives you domain DNS guidance, DKIM signing, delivery logs, and signed webhooks — without locking you into a black-box SaaS.`,"hero.curl":`curl -X POST https://mail.example.com/api/send \\
  25. -H 'Authorization: Bearer <USER_API_TOKEN>' \\
  26. -H 'Content-Type: application/json' \\
  27. -d '{
  28. "from": "noreply@example.com",
  29. "to": "user@example.com",
  30. "subject": "Hello from MailHub",
  31. "text": "Signed with DKIM and queued by MailHub."
  32. }'`,"trust.selfHosted":`Self-hosted`,"trust.webhooks":`Delivery webhooks`,"features.title":`Built for production senders`,"features.sub":`Everything you need to authenticate domains and observe delivery.`,"features.dns.title":`Domains & DNS`,"features.dns.body":`Guided SPF, DKIM, DMARC, and one-click DNS provider writes.`,"features.smtp.title":`SMTP Submission`,"features.smtp.body":`App-friendly SMTP listeners with credentials you control.`,"features.api.title":`HTTP Send API`,"features.api.body":`Bearer tokens and a simple JSON send endpoint for apps and services.`,"features.mailboxes.title":`Mailboxes & receiving`,"features.mailboxes.body":`Create persistent or expiring inboxes with IMAP, POP3, forwarding, and catch-all routing.`,"features.logs.title":`Delivery logs`,"features.logs.body":`Track queue and MTA outcomes with searchable send history.`,"features.hooks.title":`Webhooks`,"features.hooks.body":`Signed callbacks for sent, bounced, and failed terminal events.`,"features.multi.title":`Multi-user isolation`,"features.multi.body":`Domains, tokens, and logs stay scoped to each account.`,"integrate.title":`Three ways to integrate`,"integrate.sub":`Pick the path that matches your stack — configure after sign-in.`,"integrate.api.title":`API`,"integrate.api.body":`Create an API token, then POST JSON to /api/send with Bearer auth.`,"integrate.api.link":`See API sample →`,"integrate.smtp.title":`SMTP`,"integrate.smtp.body":`Point your app at MailHub submission ports with per-user credentials.`,"integrate.smtp.link":`See SMTP details →`,"integrate.hooks.title":`Webhooks`,"integrate.hooks.body":`Subscribe endpoints to terminal delivery events with HMAC signatures.`,"integrate.hooks.link":`See webhook events →`,"quickstart.title":`Start in four steps`,"quickstart.sub":`Keep domain, token, mailbox, and delivery configuration in one console.`,"quickstart.domain.title":`Add a domain`,"quickstart.domain.body":`Add your sending domain and publish the DNS records shown by MailHub.`,"quickstart.domain.link":`Review domain setup →`,"quickstart.token.title":`Create a scoped token`,"quickstart.token.body":`Give each integration only the send or mailbox permissions it needs.`,"quickstart.token.link":`Review API access →`,"quickstart.mailbox.title":`Provision mailboxes`,"quickstart.mailbox.body":`Create persistent mailboxes in the console or create persistent and temporary mailboxes by API.`,"quickstart.mailbox.link":`Review mailbox API →`,"quickstart.client.title":`Connect your client`,"quickstart.client.body":`Use SMTP to send and IMAP or POP3 to receive with the full mailbox address and password.`,"quickstart.client.link":`Review protocol settings →`,"api.title":`Send API`,"api.sub":`Minimal JSON contract. Hostnames below are placeholders — replace with your MailHub host.`,"api.curl":`curl -X POST https://mail.example.com/api/send \\
  33. -H 'Authorization: Bearer <USER_API_TOKEN>' \\
  34. -H 'Content-Type: application/json' \\
  35. -d '{
  36. "from": "noreply@example.com",
  37. "to": "user@example.com",
  38. "subject": "Hello from MailHub",
  39. "text": "Signed with DKIM and queued by MailHub."
  40. }'`,"api.field.from":`sender address on a verified domain`,"api.field.to":`recipient string or array`,"api.field.subject":`message subject`,"api.field.body":`plain text or HTML body`,"mailboxes.title":`Mailbox API and clients`,"mailboxes.sub":`Create a persistent address for ongoing work, or an expiring address for a short-lived workflow.`,"mailboxes.api.title":`Create a mailbox`,"mailboxes.api.body":`POST to /api/mailboxes with a token holding mailboxes:write. The target domain must belong to that account.`,"mailboxes.api.mode":`permanent or temporary`,"mailboxes.api.address":`use a full address, or let a temporary mailbox generate one from domain`,"mailboxes.api.expires":`required for temporary mailboxes; 5 minutes to 30 days`,"mailboxes.api.password":`optional; a secure password is returned once when omitted`,"mailboxes.client.title":`Use the returned configuration`,"mailboxes.client.body":`Creation returns the address, password, expiration, and ready-to-use IMAP, POP3, and SMTP settings.`,"mailboxes.client.imap":`recommended for synchronized folders and sent mail`,"mailboxes.client.pop3":`for download-oriented clients`,"mailboxes.client.smtp":`use the same full mailbox address and password to send`,"mailboxes.curl":`curl -X POST https://mail.example.com/api/mailboxes \\
  41. -H 'Authorization: Bearer <MAILBOX_API_TOKEN>' \\
  42. -H 'Content-Type: application/json' \\
  43. -d '{
  44. "mode": "temporary",
  45. "domain": "example.com",
  46. "expiresInMinutes": 60
  47. }'`,"mailboxes.note":`Use GET /api/mailboxes with mailboxes:read to list the account's mailboxes. A temporary mailbox stops accepting mail and authenticating at its expiration time.`,"domainsDoc.title":`Domain configuration`,"domainsDoc.sub":`Create the domain in MailHub first. Its DNS panel is the source of truth for your exact verification, DKIM, SPF, DMARC, and sender-host values.`,"domainsDoc.col.purpose":`Purpose`,"domainsDoc.col.record":`Record`,"domainsDoc.col.requirement":`Requirement`,"domainsDoc.row.verify":`Domain ownership`,"domainsDoc.row.verifyValue":`Publish the verification value generated in the console.`,"domainsDoc.row.dkim":`Publish the public key generated for this domain.`,"domainsDoc.row.spf":`Keep one SPF record and include the sender IP/host required by MailHub.`,"domainsDoc.row.dmarc":`Start with monitoring, then strengthen the policy after alignment is verified.`,"domainsDoc.row.mx":`Inbound mail`,"domainsDoc.row.mxValue":`Point MX to the MailHub receiving host and ensure that host has an A/AAAA record.`,"domainsDoc.note":`For reliable delivery, also configure the sending IP's PTR to match the MailHub sending hostname and allow the documented SMTP, IMAP, and POP3 ports through your firewall.`,"smtp.title":`SMTP submission`,"smtp.sub":`Default listener ports (override in your deployment):`,"smtp.note":`Use a mailbox's full address and password for SMTP, IMAP, and POP3. Prefer TLS ports 465, 993, and 995; use STARTTLS/STLS on the plain ports when needed.`,"webhooks.title":`Delivery webhooks`,"webhooks.sub":`Terminal events only — signed HTTPS callbacks to your systems.`,"webhooks.col.status":`Status`,"webhooks.col.type":`type`,"webhooks.sig":`Signature header:`,"ctaBand.title":`Ready to send?`,"ctaBand.sub":`Create an account, add a domain, and ship your first message in minutes.`,"footer.tag":`Self-hosted email delivery control plane`}};function r(){try{let n=localStorage.getItem(e);if(n&&t.includes(n))return n}catch{}return(typeof navigator<`u`&&navigator.language||``).toLowerCase().startsWith(`zh`)?`zh-CN`:`en-US`}function i(e,t){return n[e]?.[t]??n[`en-US`][t]??t}function a(t){try{localStorage.setItem(e,t)}catch{}}var o=r();function s(e){let n=e&&t.includes(e)?e:`en-US`;o=n,a(n),document.documentElement.lang=n===`zh-CN`?`zh-CN`:`en`,document.querySelectorAll(`[data-i18n]`).forEach(e=>{let t=e.dataset.i18n;t&&(e.textContent=i(n,t))}),document.querySelectorAll(`[data-i18n-html]`).forEach(e=>{let t=e.dataset.i18nHtml;t&&(e.innerHTML=i(n,t))}),document.querySelectorAll(`.lang-btn`).forEach(e=>{e.classList.toggle(`is-active`,e.dataset.locale===n)}),document.title=n===`zh-CN`?`MailHub · 事务邮件平台`:`MailHub · Transactional Email`}function c(){document.querySelectorAll(`.lang-btn`).forEach(e=>{e.addEventListener(`click`,()=>{s(e.dataset.locale||`en-US`)})})}function l(){document.querySelectorAll(`.copy-btn`).forEach(e=>{e.addEventListener(`click`,async()=>{let t=e.dataset.copyTarget,n=(t?document.getElementById(t):null)?.textContent||``;if(n)try{await navigator.clipboard.writeText(n);let t=e.textContent;e.textContent=i(o,`common.copied`),window.setTimeout(()=>{e.textContent=t||i(o,`common.copy`)},1400)}catch{}})})}s(o),c(),l();