[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79PCZ2CNZ34TM2V2NATX90S":3,"skill-same:01M79PCZ2CNZ34TM2V2NATX90S":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":14,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M79PCZ2CNZ34TM2V2NATX90S","mailtrap-email-integration",null,"Guides agents through integrating transactional email sending via Mailtrap's Email API, including sandbox testing, domain verification, and API authentication. Use when implementing email-sending features, debugging delivery issues, or setting up safe dev\u002Fstaging email testing.","JunMystery\u002FAgent-Guidance","JunMystery","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F161468934?v=4","01M79MTMV8F0BY8NK1A92RA8A0","Jun","01M79MTMWCFBKPHN5B25E6V20B",0,"MIT","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fmailtrap-email-integration\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: mailtrap-email-integration\ndescription: Guides agents through integrating transactional email sending via Mailtrap's Email API, including sandbox testing, domain verification, and API authentication. Use when implementing email-sending features, debugging delivery issues, or setting up safe dev\u002Fstaging email testing.\norigin: ECC\n---\n\n# Mailtrap Email Integration\n\nPatterns for adding transactional email sending to an application using Mailtrap's Email API and Sandbox, covering authentication, environment separation, and common delivery pitfalls.\n\n## When to Activate\n\n- Implementing a \"send email\" feature (signup confirmation, password reset, notifications, receipts)\n- Debugging why emails aren't arriving in dev\u002Fstaging\n- Setting up a project's first email-sending integration\n- Reviewing code that calls an email API directly without sandbox separation\n\n## Core Concepts\n\n**Sandbox vs. Production separation.** Mailtrap provides a Sandbox API that captures emails without delivering them, used for dev\u002Fstaging so test emails never reach real inboxes. Production sending uses a separate, verified-domain endpoint. Never point a dev environment at the production sending endpoint.\n\n**Authentication.** Requests use a Bearer token in the `Authorization` header. Tokens are scoped per project; sandbox and production typically use different tokens.\n\n**Domain verification.** Production sending requires verifying a sending domain via DNS records (SPF, DKIM, DMARC) before Mailtrap will deliver to real recipients. Skipping this causes silent delivery failures or spam-folder placement.\n\n## Code Examples\n\n```typescript\n\u002F\u002F Sending via Mailtrap's Email API (production)\nasync function sendEmail(to: string, subject: string, html: string) {\n  const response = await fetch(\"https:\u002F\u002Fsend.api.mailtrap.io\u002Fapi\u002Fsend\", {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.MAILTRAP_API_TOKEN}`,\n      \"Content-Type\": \"application\u002Fjson\",\n    },\n    body: JSON.stringify({\n      from: { email: \"no-reply@yourverifieddomain.com\", name: \"Your App\" },\n      to: [{ email: to }],\n      subject,\n      html,\n    }),\n  });\n\n  if (!response.ok) {\n    throw new Error(`Email send failed: ${response.status}`);\n  }\n  return response.json();\n}\n```\n\n```typescript\n\u002F\u002F Same call, routed to Sandbox in non-production environments\nconst MAILTRAP_ENDPOINT = process.env.NODE_ENV === \"production\"\n  ? \"https:\u002F\u002Fsend.api.mailtrap.io\u002Fapi\u002Fsend\"\n  : `https:\u002F\u002Fsandbox.api.mailtrap.io\u002Fapi\u002Fsend\u002F${process.env.MAILTRAP_INBOX_ID}`;\n```\n\n## Anti-Patterns\n\n| Anti-Pattern | Why It's a Problem | Instead |\n| --- | --- | --- |\n| Using the production sending endpoint in dev\u002Ftest | Real test emails reach real inboxes, risking spam complaints and leaked test data | Route non-production environments to the Sandbox endpoint |\n| Hardcoding API tokens in source | Credential leak risk if committed to version control | Load tokens from environment variables \u002F secrets manager |\n| Sending before domain verification completes | Emails silently fail or land in spam | Verify SPF\u002FDKIM\u002FDMARC records before enabling production sending |\n| No retry\u002Ferror handling on send failures | Silent notification failures (e.g., user never gets password reset email) | Check response status, log failures, surface actionable errors |\n\n## Best Practices\n\n- Keep sandbox and production tokens in separate environment variables, never share one token across environments\n- Verify sending domain DNS records before any production launch involving email\n- Log delivery failures with enough context to debug (recipient, template, timestamp, response code)\n- Treat email sending as a fallible network call: wrap in try\u002Fcatch, never assume success\n\n## Related Skills\n\n`api-and-interface-design`, `security-and-hardening`, `ci-cd-and-automation`\n","# Mailtrap Email Integration\n\nPatterns for adding transactional email sending to an application using Mailtrap's Email API and Sandbox, covering authentication, environment separation, and common delivery pitfalls.\n\n## When to Activate\n\n- Implementing a \"send email\" feature (signup confirmation, password reset, notifications, receipts)\n- Debugging why emails aren't arriving in dev\u002Fstaging\n- Setting up a project's first email-sending integration\n- Reviewing code that calls an email API directly without sandbox separation\n\n## Core Concepts\n\n**Sandbox vs. Production separation.** Mailtrap provides a Sandbox API that captures emails without delivering them, used for dev\u002Fstaging so test emails never reach real inboxes. Production sending uses a separate, verified-domain endpoint. Never point a dev environment at the production sending endpoint.\n\n**Authentication.** Requests use a Bearer token in the `Authorization` header. Tokens are scoped per project; sandbox and production typically use different tokens.\n\n**Domain verification.** Production sending requires verifying a sending domain via DNS records (SPF, DKIM, DMARC) before Mailtrap will deliver to real recipients. Skipping this causes silent delivery failures or spam-folder placement.\n\n## Code Examples\n\n```typescript\n\u002F\u002F Sending via Mailtrap's Email API (production)\nasync function sendEmail(to: string, subject: string, html: string) {\n  const response = await fetch(\"https:\u002F\u002Fsend.api.mailtrap.io\u002Fapi\u002Fsend\", {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.MAILTRAP_API_TOKEN}`,\n      \"Content-Type\": \"application\u002Fjson\",\n    },\n    body: JSON.stringify({\n      from: { email: \"no-reply@yourverifieddomain.com\", name: \"Your App\" },\n      to: [{ email: to }],\n      subject,\n      html,\n    }),\n  });\n\n  if (!response.ok) {\n    throw new Error(`Email send failed: ${response.status}`);\n  }\n  return response.json();\n}\n```\n\n```typescript\n\u002F\u002F Same call, routed to Sandbox in non-production environments\nconst MAILTRAP_ENDPOINT = process.env.NODE_ENV === \"production\"\n  ? \"https:\u002F\u002Fsend.api.mailtrap.io\u002Fapi\u002Fsend\"\n  : `https:\u002F\u002Fsandbox.api.mailtrap.io\u002Fapi\u002Fsend\u002F${process.env.MAILTRAP_INBOX_ID}`;\n```\n\n## Anti-Patterns\n\n| Anti-Pattern | Why It's a Problem | Instead |\n| --- | --- | --- |\n| Using the production sending endpoint in dev\u002Ftest | Real test emails reach real inboxes, risking spam complaints and leaked test data | Route non-production environments to the Sandbox endpoint |\n| Hardcoding API tokens in source | Credential leak risk if committed to version control | Load tokens from environment variables \u002F secrets manager |\n| Sending before domain verification completes | Emails silently fail or land in spam | Verify SPF\u002FDKIM\u002FDMARC records before enabling production sending |\n| No retry\u002Ferror handling on send failures | Silent notification failures (e.g., user never gets password reset email) | Check response status, log failures, surface actionable errors |\n\n## Best Practices\n\n- Keep sandbox and production tokens in separate environment variables, never share one token across environments\n- Verify sending domain DNS records before any production launch involving email\n- Log delivery failures with enough context to debug (recipient, template, timestamp, response code)\n- Treat email sending as a fallible network call: wrap in try\u002Fcatch, never assume success\n\n## Related Skills\n\n`api-and-interface-design`, `security-and-hardening`, `ci-cd-and-automation`\n",{"name":5,"origin":24,"description":7},"ECC","main","5d0a87185c0e172c3901e2a6e5916b6d544b8b94","skills\u002Fmailtrap-email-integration","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance","https:\u002F\u002Fgithub.com\u002FJunMystery","AI is the typist, I am the architect. Building efficient, secure, and user-centric products through disciplined AI prompt engineering.","2026-11-13 17:41:25",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add JunMystery\u002FAgent-Guidance --skill mailtrap-email-integration",{"tool":38,"command":39},"bunx","bunx skills add JunMystery\u002FAgent-Guidance --skill mailtrap-email-integration",{"tool":41,"command":42},"pnpm","pnpm dlx skills add JunMystery\u002FAgent-Guidance --skill mailtrap-email-integration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fmailtrap-email-integration\u002FSKILL.md",true,[],[47,53,59,65,71,77],{"skillNo":48,"name":49,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":19},"01M79QR1E309VJ6CTQKB32AWWA","zero-trust-architecture-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-architecture-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M79QQV7GHYR02DYGN41S23WN","xss-filter-evasion-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxss-filter-evasion-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M79QQNSN7YB8XB61FFSCS3WH","xs-leaks-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxs-leaks-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M79QQHZZJKFDY9132G5A65C2","xpath-injection-prevention-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxpath-injection-prevention-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M79QQB9ZSD3DJG8658EHQXR1","xml-security-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxml-security-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M79QQ60WKV7PFMXWT9CW8PM6","xml-external-entity-prevention-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxml-external-entity-prevention-cheat-sheet\u002FSKILL.md",[],[]]