24 lines
633 B
Go
24 lines
633 B
Go
|
package initialize
|
||
|
|
||
|
import (
|
||
|
"codeword/internal/adapters/client"
|
||
|
"github.com/gofiber/fiber/v2"
|
||
|
"go.uber.org/zap"
|
||
|
)
|
||
|
|
||
|
func InitializeRecoveryEmailSender(cfg Config, logger *zap.Logger) *client.RecoveryEmailSender {
|
||
|
return client.NewRecoveryEmailSender(client.RecoveryEmailSenderDeps{
|
||
|
SmtpApiUrl: cfg.SmtpApiUrl,
|
||
|
SmtpHost: cfg.SmtpHost,
|
||
|
SmtpPort: cfg.SmtpPort,
|
||
|
SmtpSender: cfg.SmtpSender,
|
||
|
Username: cfg.SmtpUsername,
|
||
|
Password: cfg.SmtpPassword,
|
||
|
ApiKey: cfg.SmtpApiKey,
|
||
|
FiberClient: &fiber.Client{},
|
||
|
Logger: logger,
|
||
|
CodewordHost: cfg.HTTPHost,
|
||
|
CodewordPort: cfg.HTTPPort,
|
||
|
})
|
||
|
}
|