init: SR System — Helpdesk & ITAM Portal
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package com.srsystem.service.notification;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class EmailSender {
|
||||
|
||||
@Value("${notification.email.enabled:false}")
|
||||
private boolean emailEnabled;
|
||||
|
||||
public void send(String to, String subject, String body) {
|
||||
if (!emailEnabled) {
|
||||
log.debug("Email notification disabled, skipping");
|
||||
return;
|
||||
}
|
||||
// TODO: Implement JavaMailSender or external email API
|
||||
log.info("Email notification sent: to={}, subject={}", to, subject);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user