Files
2025-04-24 23:26:46 +05:00

21 lines
438 B
Go

package notifier
import (
"github.com/JscorpTech/notification/internal/domain"
"github.com/JscorpTech/notification/internal/services"
)
type emailNotifier struct {
EmailService domain.EmailServicePort
}
func NewEmailNotifier() domain.NotifierPort {
return &emailNotifier{
EmailService: services.NewEmailService(),
}
}
func (n *emailNotifier) SendMessage(to []string, body string) {
n.EmailService.SendMail(to, []byte(body))
}