mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-15 14:56:42 +00:00
feat(GODT-2799): SMTP service interacts directly with Server Manager
Bridge no longer needs to manually add and remove accounts from the service.
This commit is contained in:
@ -22,23 +22,12 @@ import (
|
||||
"crypto/tls"
|
||||
|
||||
"github.com/ProtonMail/proton-bridge/v3/internal/identifier"
|
||||
"github.com/ProtonMail/proton-bridge/v3/internal/user"
|
||||
)
|
||||
|
||||
func (bridge *Bridge) restartSMTP(ctx context.Context) error {
|
||||
return bridge.serverManager.RestartSMTP(ctx)
|
||||
}
|
||||
|
||||
// addSMTPUser connects the given user to the smtp server.
|
||||
func (bridge *Bridge) addSMTPUser(ctx context.Context, user *user.User) error {
|
||||
return bridge.serverManager.AddSMTPAccount(ctx, user.GetSMTPService())
|
||||
}
|
||||
|
||||
// removeSMTPUser disconnects the given user from the smtp server.
|
||||
func (bridge *Bridge) removeSMTPUser(ctx context.Context, user *user.User) error {
|
||||
return bridge.serverManager.RemoveSMTPAccount(ctx, user.GetSMTPService())
|
||||
}
|
||||
|
||||
type bridgeSMTPSettings struct {
|
||||
b *Bridge
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user