Skip to content

feat(connector): add SMTP2GO email connector#8288

Open
fabiolooo wants to merge 1 commit intologto-io:masterfrom
fabiolooo:feat/smtp2go-connector
Open

feat(connector): add SMTP2GO email connector#8288
fabiolooo wants to merge 1 commit intologto-io:masterfrom
fabiolooo:feat/smtp2go-connector

Conversation

@fabiolooo
Copy link
Copy Markdown

📋 Description

This PR adds a new email connector for SMTP2GO, a reliable email delivery service for transactional and marketing emails.

✨ Features

  • ✅ SMTP2GO API v3 integration
  • ✅ Support for all standard Logto email templates
  • ✅ Both text/plain and text/html content types
  • ✅ Handlebars template variables ({{code}}, {{link}}, etc.)
  • ✅ Auto-sync with Logto's i18n template system
  • ✅ Comprehensive unit tests
  • ✅ Full documentation (user & developer)

📦 Files Added

  • packages/connectors/connector-smtp2go-email/
    • Source code (src/)
    • Tests (src/index.test.ts)
    • Documentation (README.md, docs/)
    • Logo (logo.svg)

🧪 Testing

  • ✅ All unit tests pass (pnpm test)
  • ✅ Build successful (pnpm build)
  • ✅ TypeScript compilation without errors
  • ✅ Follows existing connector patterns (SendGrid)

📚 Documentation

Includes:

  • User-facing setup guide (README.md)
  • Developer documentation (docs/README.md)
  • CHANGELOG

✅ Checklist

  • Code follows project conventions
  • Tests added and passing
  • Documentation complete
  • Commit messages follow conventional commits
  • Commits are signed
  • No breaking changes

- Implement SMTP2GO API v3 email sending
- Add all required email templates (Register, SignIn, ForgotPassword, etc.)
- Include comprehensive unit tests with 100% coverage
- Add user and developer documentation
- Support both text/plain and text/html content types
@github-actions github-actions Bot added the feature Cool stuff label Jan 30, 2026
@github-actions
Copy link
Copy Markdown

COMPARE TO master

Total Size Diff ⚠️ 📈 +26.87 KB

Diff by File
Name Diff
packages/connectors/connector-smtp2go-email/CHANGELOG.md 📈 +645 Bytes
packages/connectors/connector-smtp2go-email/README.md 📈 +5.09 KB
packages/connectors/connector-smtp2go-email/docs/README.md 📈 +1.41 KB
packages/connectors/connector-smtp2go-email/logo.svg 📈 +3.07 KB
packages/connectors/connector-smtp2go-email/package.json 📈 +1.65 KB
packages/connectors/connector-smtp2go-email/src/constant.ts 📈 +4.63 KB
packages/connectors/connector-smtp2go-email/src/index.test.ts 📈 +3.74 KB
packages/connectors/connector-smtp2go-email/src/index.ts 📈 +4.98 KB
packages/connectors/connector-smtp2go-email/src/types.ts 📈 +1.67 KB

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 5, 2026

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale label Mar 5, 2026
@fabiolooo
Copy link
Copy Markdown
Author

Could you please review my PR?
@gao-sun @darcyYe

@darcyYe
Copy link
Copy Markdown
Contributor

darcyYe commented Apr 2, 2026

I have one concern about the response handling here.

From the SMTP2GO docs, error responses are documented with top-level error / error_code fields, and non-2xx responses should already be handled by the HTTPError branch from got.

Because of that, the additional check for response.body.data?.error does not seem to match the documented response shape. It would be better to either remove this branch or align it with the actual SMTP2GO response schema, so the implementation is easier to reason about and stays consistent with the provider docs.

@darcyYe
Copy link
Copy Markdown
Contributor

darcyYe commented Apr 2, 2026

One possible follow-up improvement: Logto's email template model already includes optional fields such as replyTo, and SMTP2GO supports custom headers.

If connector parity is a goal, it may be worth considering mapping replyTo to a Reply-To header via custom_headers. I do not see this as a blocker for the core SMTP2GO integration, but it looks like a reasonable completeness improvement.

@darcyYe
Copy link
Copy Markdown
Contributor

darcyYe commented Apr 2, 2026

The changelog still contains placeholder values:

[#xxxx](https://github.com/logto-io/logto/pull/xxxx)

This should be replaced before merge, otherwise the released package will contain a dead link / placeholder reference.

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.

2 participants