Email & SMS
What this extension does
Section titled “What this extension does”Email & SMS provides asynchronous messaging capabilities in Dynamia applications.
It includes:
- email accounts and templates,
- SMS sending support,
- message logs and management UI.
<dependency>
<groupId>tools.dynamia.modules</groupId>
<artifactId>tools.dynamia.modules.email</artifactId>
<version>26.4.0</version>
</dependency>
<dependency>
<groupId>tools.dynamia.modules</groupId>
<artifactId>tools.dynamia.modules.email.ui</artifactId>
<version>26.4.0</version>
</dependency>
Gradle
Section titled “Gradle”implementation 'tools.dynamia.modules:tools.dynamia.modules.email:26.4.0'
implementation 'tools.dynamia.modules:tools.dynamia.modules.email.ui:26.4.0'
Frontend package
Section titled “Frontend package”No dedicated Node package is currently published for this extension.
Frontend apps usually interact through backend APIs and actions exposed by your Dynamia application.
Java usage example
Section titled “Java usage example”import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Service;import tools.dynamia.modules.email.domain.EmailMessage;import tools.dynamia.modules.email.services.EmailService;import tools.dynamia.modules.email.sms.SMSMessage;import tools.dynamia.modules.email.sms.SMSService;
@Servicepublic class NotificationService {
@Autowired private EmailService emailService;
@Autowired private SMSService smsService;
public void sendNotification(String emailTo, String mobile, String message) { var email = new EmailMessage(emailTo, "Notification", message); var sms = new SMSMessage(mobile, message);
emailService.send(email); smsService.send(sms); }}