Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dynamiatools/module-email
DynamiaTools extension to easily manage email accounts and send emails message
https://github.com/dynamiatools/module-email
dynamia email java javamail sms zk
Last synced: 5 days ago
JSON representation
DynamiaTools extension to easily manage email accounts and send emails message
- Host: GitHub
- URL: https://github.com/dynamiatools/module-email
- Owner: dynamiatools
- License: apache-2.0
- Created: 2019-05-13T20:31:39.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-10T11:39:39.000Z (2 months ago)
- Last Synced: 2024-09-10T12:56:48.660Z (2 months ago)
- Topics: dynamia, email, java, javamail, sms, zk
- Language: Java
- Homepage: https://www.dynamia.tools
- Size: 187 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Maven Central](https://img.shields.io/maven-central/v/tools.dynamia.modules/tools.dynamia.modules.email)](https://search.maven.org/search?q=tools.dynamia.modules.email)
![Java Version Required](https://img.shields.io/badge/java-17-blue)
[![Maven Build](https://github.com/dynamiatools/module-email/actions/workflows/maven.yml/badge.svg)](https://github.com/dynamiatools/module-email/actions/workflows/maven.yml)
[![Release and Deploy](https://github.com/dynamiatools/module-email/actions/workflows/release.yml/badge.svg)](https://github.com/dynamiatools/module-email/actions/workflows/release.yml)# Email and SMS Module
This [DynamiaTools](https://dynamia.tools) extension allow you to send email and SMS messages using JavaMail and AWS.
This library install a ew DynamiaTools module called `Email` with CRUDs to set up emails and sms accounts, email
templates and query sending logs## Modules
- Core: Entities, Services and API implementation
- JPA Entities:
- `EmailAccount`
- `EmailTemplate`
- `EmailAddress`
- `SMSMessageLog`
- UI: Actions and views for user interface integration.## Installation
Add the following dependencies to project classpath
**Maven**
```xml
tools.dynamia.modules
tools.dynamia.modules.email
3.1.1```
```xml
tools.dynamia.modules
tools.dynamia.modules.email.ui
3.1.1```
**Gradle**
```groovy
compile 'tools.dynamia.modules:tools.dynamia.modules.email:3.1.1'
compile 'tools.dynamia.modules:tools.dynamia.modules.email.ui:3.1.1'
```## Usage
Main services are `EmailService` to send `EmailMessage` and `SMSService` to send `SMSMessage`
```java
@Service
class SomeService { //spring service@Autowired
private EmailService emailService;@Autowired
private SMSService smsService;public void sendNotification(Person person, String message) {
var email = new EmailMessage(person.getEmail(), "Notification", message);
var sms = new SMSMessage(person.getMobileNumber(), message);//sending messages is async
emailService.send(email); //return a Future
smsService.send(sms); //return sms uuid}
}
```
`EmailService` and `SMSService` require at least one preferred `EmailAccount` created. These service
will get the preferred account automatically. On the other hand, you can set up the `EmailAccount` in the
`EmailMessage` and AWS Credentials in the `SMSMessage` directly.If the `EmailMessage` has a `EmailTemplate` and this template has configured an SMS message, when you send
the email the SMS will be sent too.## License
DynamiaTools Email is available under Apache 2 License