Skip to content

Commit c1affa7

Browse files
committed
update readme
1 parent 57517be commit c1affa7

1 file changed

Lines changed: 17 additions & 9 deletions

File tree

readme.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A reusable mailer service to send emails.
44

55
## Setup
66

7-
Add the mailer service to the classpath by adding the following maven dependeny:
7+
Add the mailer service to the classpath by adding the following maven dependency. Versions haven be found [here](../../packages)
88

99
```xml
1010

@@ -15,14 +15,18 @@ Add the mailer service to the classpath by adding the following maven dependeny:
1515
</dependency>
1616
```
1717

18+
### Attachments
19+
1820
If you want to use attachments, you will have to create a bean implementing this interface: [AttachmentDataSource.java](src%2Fmain%2Fjava%2Fit%2Faboutbits%2Fspringboot%2Femailservice%2Flib%2FAttachmentDataSource.java)
1921
This step is optional.
2022

2123
## Usage
2224

23-
Use the `ManageEmail` service to schedule sending an email.
25+
### Sending an Email
26+
27+
Use the `ManageEmail` service to schedule an email.
2428

25-
### Example
29+
#### Example
2630

2731
```java
2832
// @formatter:off
@@ -44,11 +48,15 @@ public void sendMail(final String to,final String subject,final String htmlBody,
4448
// @formatter:on
4549
```
4650

51+
### Querying Emails
52+
4753
To read email datasets from the database use this class: [QueryEmail.java](src%2Fmain%2Fjava%2Fit%2Faboutbits%2Fspringboot%2Femailservice%2Flib%2Fapplication%2FQueryEmail.java)
4854

55+
### Reporting callback
56+
4957
If you want to receive a report after each run of the scheduler, create a Bean implementing [EmailSchedulerCallback.java](src%2Fmain%2Fjava%2Fit%2Faboutbits%2Fspringboot%2Femailservice%2Flib%2FEmailSchedulerCallback.java)
5058

51-
## Configuration
59+
### Configuration
5260

5361
You will have to enable `EntityScanning` for the package as well as your main package. You must also add it to the base packages for Spring to scan.
5462

@@ -57,12 +65,12 @@ You will have to enable `EntityScanning` for the package as well as your main pa
5765
@EntityScan({"the.main.package", "it.aboutbits.springboot.emailservice"})
5866
```
5967

60-
Available configuration options are:
68+
The following configuration options are available:
6169

62-
```yaml
63-
lib.emailservice.scheduling.enabled: true
64-
lib.emailservice.scheduling.interval: 30000
65-
```
70+
| Name | Default | Description |
71+
|--------------------------------------------|-------------|-------------------------------------------------------------------------|
72+
| `lib.emailservice.scheduling.enabled` | true | Enables the scheduler sending the emails. |
73+
| `lib.emailservice.scheduling.interval` | 30000 | Specifies the milliseconds delay between runs of the scheduler. |
6674

6775
## Building and releasing a new version:
6876

0 commit comments

Comments
 (0)