Skip to content

Commit 70aa23e

Browse files
committed
feat(mailtrap): add Mailtrap email, contacts, and email logs integration
Add Mailtrap alongside the existing email integrations (agentmail, mailgun, resend, sendgrid, smtp, gmail). Tools (apps/sim/tools/mailtrap/, 12): - send_email — transactional, bulk, or sandbox stream; text/HTML/template body, cc/bcc/reply-to, category, custom variables, custom headers - create_contact / get_contact / update_contact / delete_contact - list_contact_lists / create_contact_list / get_contact_list / update_contact_list / delete_contact_list - list_email_logs / get_email_log — curated filter set with fixed operators (subject match contain/equal/empty; status/category/stream accept a comma-separated any-of list); negation, event, open/click count, and IP/domain filters are intentionally not exposed yet All tools call the Mailtrap API directly over the shared tool transport, token-scoped Bearer auth. Shared response mappers and output schemas live in types.ts / utils.ts. A mailtrap-errors extractor normalizes the sending API ({success,errors[]}) and account API ({error}/{errors}) error envelopes. Block, icon, and catalog: - MailtrapBlock + MailtrapBlockMeta (blocks/blocks/mailtrap.ts), registered in blocks/registry-maps.ts - theme-aware MailtrapIcon (components/icons.tsx) - regenerated tools/generated/{tool-ids,tool-metadata,tool-outputs}.ts - generated docs page (apps/docs) + synced icon maps, meta.json, and packages/deployment-config integrations.json Tests: apps/sim/tools/mailtrap/mailtrap.test.ts covering address parsing, stream routing, filter query building, response normalization, the error extractor, and a transformResponse cohort invariant.
1 parent 477dcb2 commit 70aa23e

30 files changed

Lines changed: 3321 additions & 4 deletions

apps/docs/components/icons.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6553,6 +6553,25 @@ export function MailgunIcon(props: SVGProps<SVGSVGElement>) {
65536553
)
65546554
}
65556555

6556+
export function MailtrapIcon(props: SVGProps<SVGSVGElement>) {
6557+
return (
6558+
<svg {...props} viewBox='0 0 36 41' fill='none' xmlns='http://www.w3.org/2000/svg'>
6559+
<path
6560+
d='m6.826 29.699-3.394 2.013c-.46.303-.25.823 0 .928l13.183 7.387c.779.436 1.738.436 2.517 0l13.358-7.484c.405-.24.338-.727 0-.891l-3.589-1.939c-.303-.2-.978-.133-1.218.029l-8.551 4.791c-.779.436-1.738.436-2.517 0l-8.626-4.833c-.322-.198-.831-.187-1.162 0z'
6561+
fill='currentColor'
6562+
/>
6563+
<path
6564+
d='m16.615.681c.779-.436 1.738-.436 2.517 0 0 0 9.994 5.6 10.616 5.948.424.214.462.79 0 1.05-.7.391-1.638.914-2.417 1.349-.91.507-2.018.506-2.926-.003l-5.272-2.954c-.779-.436-1.738-.436-2.517 0l-5.278 2.957c-.91.51-2.018.511-2.929.003-.81-.452-1.792-.999-2.5-1.393-.393-.169-.474-.669 0-.957z'
6565+
fill='currentColor'
6566+
/>
6567+
<path
6568+
d='m34.488 9.634c.779.436 1.258 1.243 1.258 2.115v17.209c0 .852-.533 1.011-1.102.713l-3.931-2.122v-11.569l-11.581 6.489c-.779.436-1.738.436-2.517 0l-11.581-6.489v11.568l-3.572 2.121c-.426.271-1.461.356-1.461-.711v-17.209c0-.873.48-1.679 1.258-2.115 1.253-.656 2.547 0 2.547 0l14.067 7.899 14.045-7.899s1.247-.752 2.57 0z'
6569+
fill='#22D172'
6570+
/>
6571+
</svg>
6572+
)
6573+
}
6574+
65566575
export function SmtpIcon(props: SVGProps<SVGSVGElement>) {
65576576
return (
65586577
<svg

apps/docs/components/ui/icon-mapping.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ import {
151151
MailchimpIcon,
152152
MailgunIcon,
153153
MailServerIcon,
154+
MailtrapIcon,
154155
ManageEngineIcon,
155156
Mem0Icon,
156157
MicrosoftDataverseIcon,
@@ -452,6 +453,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
452453
luma: LumaIcon,
453454
mailchimp: MailchimpIcon,
454455
mailgun: MailgunIcon,
456+
mailtrap: MailtrapIcon,
455457
managed_agent: ClaudeIcon,
456458
manageengine_sdp: ManageEngineIcon,
457459
mem0: Mem0Icon,

apps/docs/content/docs/integrations/mailtrap.mdx

Lines changed: 348 additions & 0 deletions
Large diffs are not rendered by default.

apps/docs/content/docs/integrations/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@
157157
"luma",
158158
"mailchimp",
159159
"mailgun",
160+
"mailtrap",
160161
"managed_agent",
161162
"manageengine_sdp",
162163
"mem0",

0 commit comments

Comments
 (0)