{"id":19472357,"url":"https://github.com/aboutbits/spring-boot-email-service","last_synced_at":"2026-04-15T20:03:21.063Z","repository":{"id":180991595,"uuid":"665029988","full_name":"aboutbits/spring-boot-email-service","owner":"aboutbits","description":"Spring Boot - Email Service","archived":false,"fork":false,"pushed_at":"2024-09-10T12:08:31.000Z","size":154,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-08T05:51:25.594Z","etag":null,"topics":["email","email-service","java","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aboutbits.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-11T09:29:32.000Z","updated_at":"2024-09-10T12:08:33.000Z","dependencies_parsed_at":"2024-05-17T07:27:29.071Z","dependency_job_id":"32721776-dc84-46b1-8ebf-5b60d61e3f36","html_url":"https://github.com/aboutbits/spring-boot-email-service","commit_stats":null,"previous_names":["aboutbits/spring-boot-email-service"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboutbits%2Fspring-boot-email-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboutbits%2Fspring-boot-email-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboutbits%2Fspring-boot-email-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboutbits%2Fspring-boot-email-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aboutbits","download_url":"https://codeload.github.com/aboutbits/spring-boot-email-service/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240692384,"owners_count":19842240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["email","email-service","java","spring-boot"],"created_at":"2024-11-10T19:14:12.325Z","updated_at":"2025-10-15T18:32:55.869Z","avatar_url":"https://github.com/aboutbits.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Boot EMail Service\n\nA reusable mailer service to send emails.\n\n## Setup\n\nAdd the mailer service to the classpath by adding the following maven dependency. Versions haven be found [here](../../packages)\n\n```xml\n\n\u003cdependency\u003e\n    \u003cgroupId\u003eit.aboutbits.springboot\u003c/groupId\u003e\n    \u003cartifactId\u003eemailservice\u003c/artifactId\u003e\n    \u003cversion\u003ex.x.x\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Attachments\n\nIf 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)  \nThis step is optional.\n\n## Usage\n\n### Sending an Email\n\nUse the `ManageEmail` service to schedule an email.\n\n#### Example\n\n```java\n// @formatter:off\npublic void sendMail(final String to,final String subject,final String htmlBody,final String plainTextBody) {\n        manageEmail.schedule(\n                EmailParameter.builder()\n                        .scheduleAt(OffsetDateTime.now())\n                        .email(EmailParameter.Email.builder()\n                                .fromName(fromName)\n                                .fromAddress(fromAddress)\n                                .recipient(to)\n                                .subject(subject)\n                                .textBody(plainTextBody)\n                                .htmlBody(htmlBody)\n                                .build())\n                        .build()\n        );\n}\n// @formatter:on \n```\n\n### Querying Emails\n\nTo read email datasets from the database use this class: [QueryEmail.java](src%2Fmain%2Fjava%2Fit%2Faboutbits%2Fspringboot%2Femailservice%2Flib%2Fapplication%2FQueryEmail.java)\n\n### Reporting callback\n\nIf 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)\n\n### Configuration\n\nTo enable this service just add `@EnableEmailService` to your main class. You must also enable `@EnableScheduling` to allow the email queue to be processed.\n\n```java\n\n@SpringBootApplication\n@EnableEmailService\n@EnableScheduling\npublic class App {\n    public static void main(final String[] args) {\n        SpringApplication.run(App.class, args);\n    }\n}\n```\n\nThe following configuration options are available:\n\n| Name                                   | Default     | Description                                                           |\n|----------------------------------------|-------------|-----------------------------------------------------------------------|\n| `lib.emailservice.migrations.enabled`  | true        | Enables database migrations.                                          |\n| `lib.emailservice.scheduling.enabled`  | true        | Enables the scheduler sending the emails.                             |\n| `lib.emailservice.scheduling.interval` | 30000       | Specifies the milliseconds delay between runs of the scheduler.       |\n\n## Local development:\n\nTo use this library as a local development dependency, you can simply refer to the version `BUILD-SNAPSHOT`.\n\nCheck out this repository and run the maven goal `install`. This will build and install this library as version `BUILD-SNAPSHOT` into your local maven cache.\n\nNote that you may have to tell your IDE to reload your main maven project each time you build the library.\n\n## Build \u0026 Publish\n\nTo build and publish the chart, visit the GitHub Actions page of the repository and trigger the workflow \"Release Package\" manually.\n\n## Information\n\nAbout Bits is a company based in South Tyrol, Italy. You can find more information about us on [our website](https://aboutbits.it).\n\n### Support\n\nFor support, please contact [info@aboutbits.it](mailto:info@aboutbits.it).\n\n### Credits\n\n- [All Contributors](../../contributors)\n\n### License\n\nThe MIT License (MIT). Please see the [license file](license.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faboutbits%2Fspring-boot-email-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faboutbits%2Fspring-boot-email-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faboutbits%2Fspring-boot-email-service/lists"}