-
Notifications
You must be signed in to change notification settings - Fork 1.7k
UBERF-13120: Support SMTP mail for different accounts #9674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Artem Savchenko <armisav@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements support for SMTP mail authentication using different user accounts by allowing dynamic SMTP credentials to be passed per email request. The implementation adds caching for SMTP transporters to improve performance when multiple emails are sent using the same credentials.
Key changes:
- Added password parameter to email sending flow for per-request SMTP authentication
- Implemented LRU cache for SMTP transporters to avoid recreating connections
- Extended account client to fetch mailbox secrets for authentication
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| services/mail/pod-mail/src/transport.ts | Renamed getTransport to getDefaultTransport and added getSmtpTransport for custom credentials |
| services/mail/pod-mail/src/main.ts | Added password parameter extraction and passing to sendMessage |
| services/mail/pod-mail/src/mail.ts | Implemented transporter caching and credential-based transporter selection |
| services/mail/pod-mail/src/tests/main.test.ts | Updated tests to include password parameter |
| services/mail/pod-mail/package.json | Added lru-cache dependency |
| services/mail/pod-mail-worker/src/send.ts | Added secret parameter to sendEmail function |
| services/mail/pod-mail-worker/src/mailWorker.ts | Integrated mailbox secret retrieval and caching |
| server/account/src/operations.ts | Added getMailboxSecret method |
| packages/account-client/src/types.ts | Defined MailboxSecret interface |
| packages/account-client/src/client.ts | Added getMailboxSecret method to AccountClient |
Files not reviewed (1)
- common/config/rush/pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…ith insufficient computational effort Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Artyom Savchenko <armisav@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Artyom Savchenko <armisav@gmail.com>
Signed-off-by: Artem Savchenko <armisav@gmail.com>
Signed-off-by: Artem Savchenko <armisav@gmail.com>
Signed-off-by: Artem Savchenko <armisav@gmail.com>
Signed-off-by: Artem Savchenko <armisav@gmail.com>
lexiv0re
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.