大规模测试验证流程

注册验证

验证您的注册和验证流程。通过程序化方式接收 OTP 验证码、魔法链接和确认邮件。

核心功能

  • 捕获 OTP 验证码
  • 提取魔法链接
  • 测试边界情况
  • 监控邮件送达率

示例

// JavaScript example
async function testSignupFlow() {
  // Create temp inbox
  const inbox = await mailhook.createRandomAddress();

  // Submit signup form
  await page.fill('#email', inbox.address);
  await page.click('#submit');

  // Wait for and retrieve OTP
  const emails = await mailhook.pollInbox(inbox.id, {
    timeout: 30000
  });

  // Extract OTP from email
  const otp = emails[0].textBody.match(/\d{6}/)[0];

  // Complete verification
  await page.fill('#otp', otp);
  await page.click('#verify');

  // Assert success
  expect(await page.url()).toContain('/dashboard');
}

准备好开始了吗?

60 秒内创建您的第一个邮箱。