feat(connector): add SMTP2GO email connector#8288
Conversation
- 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
COMPARE TO
|
| 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 |
|
This PR is stale because it has been open for 30 days with no activity. |
|
I have one concern about the response handling here. From the SMTP2GO docs, error responses are documented with top-level Because of that, the additional check for |
|
One possible follow-up improvement: Logto's email template model already includes optional fields such as If connector parity is a goal, it may be worth considering mapping |
|
The changelog still contains placeholder values:
This should be replaced before merge, otherwise the released package will contain a dead link / placeholder reference. |
|
@fabiolooo thanks for your contribution, could you please check the review comments? |
Use ^2.9.1 for @silverhand/essentials, regenerate lockfile without unrelated changes, point CHANGELOG to #8288, and remove unused type.
Use ^2.9.1 for @silverhand/essentials, regenerate lockfile without unrelated changes, point CHANGELOG to #8288, and remove unused type.
|
resolved in #8920 |
* feat(connector): add SMTP2GO email connector - 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 * feat(connector): add SMTP2GO email connector Take over community PR #8288 and address review feedback: - Remove incorrect 200-response data.error check; rely on HTTP errors - Map i18n replyTo to Reply-To custom header - Fix CHANGELOG PR link placeholder - Add unit test for replyTo header * chore(connector): point smtp2go changelog to PR #8920 * fix(connector): address SMTP2GO PR review feedback - Parse custom i18n sendFrom as RFC-822 mailbox (name/address override) - Remove changeset for initial 1.0.0 release - Pin @silverhand/essentials to 2.9.2 to avoid unrelated lockfile drift - Fix TemplateNotFound test and reset i18n mock between cases * refactor(toolkit): extract shared SMTP mailbox sanitization utilities Move stripHeaderControlChars, sanitizeMailboxDisplayName, sanitizeMailboxAddress, formatMailbox, and parseSendFrom into @logto/connector-kit so connector-smtp2go-email and connector-mailjunky share one implementation for header-injection prevention. Co-authored-by: wangsijie <sijiewg@gmail.com> * fix(connector): validate template usageType with templateTypeGuard Use templateTypeGuard from connector-kit instead of z.string() so invalid usageType values are rejected at config validation time. Co-authored-by: wangsijie <sijiewg@gmail.com> * fix(toolkit): replace parseSendFrom regex with linear parsing Replace the polynomial-backtracking mailbox regex flagged by CodeQL with O(n) string parsing. Behavior is unchanged; MailJunky and SMTP2GO tests pass. Co-authored-by: wangsijie <sijiewg@gmail.com> * fix(connector): address smtp2go PR review feedback Use ^2.9.1 for @silverhand/essentials, regenerate lockfile without unrelated changes, point CHANGELOG to #8288, and remove unused type. * fix(connector): sanitize replyTo and fix Handlebars docs - Strip control characters from replyTo before setting Reply-To header - Fix Handlebars spelling in changelog and developer docs - Document full TemplateType usageType values in README Co-authored-by: wangsijie <sijiewg@gmail.com> * fix(connector): address smtp2go PR review round 2 - Trim replyTo after sanitization - Preserve HTTP error statusCode and body like Mailgun - Parse mailbox display names with embedded angle brackets - Add smtp-mailbox unit tests and connector coverage Co-authored-by: wangsijie <sijiewg@gmail.com> * chore(connector): remove hand-written smtp2go CHANGELOG Changelogs for connector packages are generated automatically when releasing changesets; remove the manual Conventional Commits file per review feedback. Co-authored-by: wangsijie <sijiewg@gmail.com> * chore: add changeset for SMTP2GO email connector Co-authored-by: wangsijie <sijiewg@gmail.com> * chore(connector): bump connector-kit changeset to minor Co-authored-by: wangsijie <sijiewg@gmail.com> --------- Co-authored-by: Fabio Lorenzo <fabio87l@gmail.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com>
📋 Description
This PR adds a new email connector for SMTP2GO, a reliable email delivery service for transactional and marketing emails.
✨ Features
{{code}},{{link}}, etc.)📦 Files Added
packages/connectors/connector-smtp2go-email/src/)src/index.test.ts)README.md,docs/)logo.svg)🧪 Testing
pnpm test)pnpm build)📚 Documentation
Includes:
README.md)docs/README.md)✅ Checklist