Skip to content

feat(connector): add MailJunky email connector#8638

Open
devadarshh wants to merge 7 commits intologto-io:masterfrom
devadarshh:feat/connector-mailjunky
Open

feat(connector): add MailJunky email connector#8638
devadarshh wants to merge 7 commits intologto-io:masterfrom
devadarshh:feat/connector-mailjunky

Conversation

@devadarshh
Copy link
Copy Markdown
Contributor

Summary

This PR adds @logto/connector-mailjunky, a native Logto email connector for MailJunky. It sends authentication and related emails by calling MailJunky’s HTTP API with Authorization: Bearer <apiKey> and a JSON body that includes from, to, subject, html, and text, with Handlebars-based templates and i18n template support consistent with other Logto email connectors.

The send endpoint used in code and docs is POST https://mailjunky.ai/api/v1/emails/send. Issue #8257 mentions https://api.mailjunky.ai/v1/send; that URL did not match the working JSON API during implementation, so this PR documents the route that returns proper API responses (see constant.ts and the connector README).

Closes #8257.

Testing

  • Unit tests: pnpm test in packages/connectors/connector-mailjunky (Vitest: index.test.ts, type.test.ts).
  • Lint / build: pnpm lint and pnpm build in packages/connectors/connector-mailjunky (optional but recommended before push).
  • Manual: Configured the connector in the Logto Console with a real MailJunky API key, verified sending domain and From address, used the connector Send test flow, and confirmed the message was received.

Checklist

  • .changeset
  • unit tests
  • integration tests (N/A — connector-only change; no packages/integration-tests updates)
  • necessary TSDoc comments (public config/types and endpoint documented where needed)

@github-actions github-actions Bot added the feature Cool stuff label Apr 9, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 9, 2026

COMPARE TO master

Total Size Diff ⚠️ 📈 +49.46 KB

Diff by File
Name Diff
packages/connectors/connector-mailjunky/CHANGELOG.md 📈 +314 Bytes
packages/connectors/connector-mailjunky/README.md 📈 +3.5 KB
packages/connectors/connector-mailjunky/logo.svg ⚠️ 📈 +17.07 KB
packages/connectors/connector-mailjunky/package.json 📈 +1.73 KB
packages/connectors/connector-mailjunky/src/constant.ts 📈 +4.05 KB
packages/connectors/connector-mailjunky/src/html-to-text.d.ts 📈 +411 Bytes
packages/connectors/connector-mailjunky/src/index.test.ts 📈 +6.14 KB
packages/connectors/connector-mailjunky/src/index.ts 📈 +6.25 KB
packages/connectors/connector-mailjunky/src/mock.ts 📈 +1.54 KB
packages/connectors/connector-mailjunky/src/type.test.ts 📈 +1.09 KB
packages/connectors/connector-mailjunky/src/types.ts 📈 +1.66 KB
pnpm-lock.yaml 📈 +5.74 KB

@devadarshh
Copy link
Copy Markdown
Contributor Author

I noticed that the endpoint mentioned in the issue (https://api.mailjunky.ai/v1/send) did not return a valid API response during implementation.

While testing against MailJunky’s current API, the working endpoint was:

https://mailjunky.ai/api/v1/emails/send

I verified this endpoint with real requests and confirmed successful email delivery. The connector implementation and README have been aligned with this working API.

Happy to update if there is an official documented endpoint I should follow.

@devadarshh devadarshh force-pushed the feat/connector-mailjunky branch from db4b266 to 56925d3 Compare April 10, 2026 11:15
@github-actions github-actions Bot added size/xl and removed size/xl labels Apr 10, 2026
@devadarshh devadarshh force-pushed the feat/connector-mailjunky branch from 56925d3 to 933816f Compare April 10, 2026 11:19
@github-actions github-actions Bot added size/xl and removed size/xl labels Apr 10, 2026
Comment thread packages/connectors/connector-mailjunky/src/index.ts Fixed
@github-actions github-actions Bot added size/xl and removed size/xl labels Apr 13, 2026
Comment thread packages/connectors/connector-mailjunky/src/index.ts
Comment thread packages/connectors/connector-mailjunky/src/index.ts
@github-actions github-actions Bot added size/xl and removed size/xl labels Apr 15, 2026
Comment thread packages/connectors/connector-mailjunky/src/index.ts Fixed
@github-actions github-actions Bot added size/xl and removed size/xl labels Apr 15, 2026
Copy link
Copy Markdown
Contributor

@wangsijie wangsijie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 PR Review

This PR adds a new MailJunky email connector with templated HTML/plain-text delivery and localized template support.

  • 🔒 Security: clean
  • 🏗️ Architecture: clean
  • 👨‍💻 Engineering: 0 high, 1 medium

Verdict: ⚠️ Needs attention

Comment thread packages/connectors/connector-mailjunky/src/index.ts Outdated
@github-actions github-actions Bot added size/xl and removed size/xl labels Apr 16, 2026
@devadarshh devadarshh force-pushed the feat/connector-mailjunky branch from c9cfc76 to 8d3aba6 Compare April 16, 2026 09:21
@github-actions github-actions Bot removed the size/xl label Apr 16, 2026
Copy link
Copy Markdown
Contributor

@wangsijie wangsijie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 PR Review

This PR adds a MailJunky email connector with localized templating support, and it still needs follow-up on provider error handling while CI is not fully green.

  • 🔒 Security: clean
  • 🏗️ Architecture: 0 high, 1 medium
  • 👨‍💻 Engineering: clean

Verdict: ⚠️ Needs attention

Comment thread packages/connectors/connector-mailjunky/src/index.ts Outdated
@github-actions github-actions Bot added size/xl and removed size/xl labels Apr 20, 2026
@wangsijie
Copy link
Copy Markdown
Contributor

Hi @devadarshh, could you please sign your commits with GPG key and then force push?

@devadarshh devadarshh force-pushed the feat/connector-mailjunky branch from b0b6d8c to 136cf17 Compare April 21, 2026 12:01
@github-actions github-actions Bot added size/xl and removed size/xl labels Apr 21, 2026
@devadarshh
Copy link
Copy Markdown
Contributor Author

Hi @devadarshh, could you please sign your commits with GPG key and then force push?

Hi @wangsijie, I’ve re-signed the commits with my GPG key and force-pushed the branch. All commits should now show Verified (GPG) on GitHub. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

feature request: MailJunky AI - Integration

4 participants