https://github.com/msteinhoff/dropwizard-smtp-mail
A set of classes to send SMTP mails in a Dropwizard application.
https://github.com/msteinhoff/dropwizard-smtp-mail
Last synced: 23 days ago
JSON representation
A set of classes to send SMTP mails in a Dropwizard application.
- Host: GitHub
- URL: https://github.com/msteinhoff/dropwizard-smtp-mail
- Owner: msteinhoff
- License: apache-2.0
- Created: 2016-09-12T17:50:29.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-18T00:34:00.000Z (almost 10 years ago)
- Last Synced: 2025-03-01T19:29:06.789Z (over 1 year ago)
- Language: Java
- Homepage:
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dropwizard SMTP mailer
[](https://travis-ci.org/msteinhoff/dropwizard-smtp-mail)
[](https://coveralls.io/r/msteinhoff/dropwizard-smtp-mail)
[](http://mvnrepository.com/artifact/io.dropwizard.modules/dropwizard-smtp-mail)
A set of classes to send [SMTP mails] [1] in a [Dropwizard] [2] application.
The package provides [lifecycle-management] [3] and configuration factory
classes with the most common options for simple-java-mail Mailer classes.
[1]: http://www.simplejavamail.org/
[2]: http://dropwizard.io/1.0.0/docs
[3]: http://dropwizard.io/1.0.0/docs/manual/core.html#managed-objects
# Usage
To embed a mailer, add a `MailerFactory` to your [Configuration](http://dropwizard.io/1.0.0/docs/manual/core.html#configuration)
class. This enables configuration of the smtp mail server, credentials and TLS
settings.
Use the `MailerFactory` class to create a `Mailer` via `build()`. A health
check is registered that checks if the host and port is reachable. The mailer is
automatically closed when dropwizard shuts down.
# Configuration
The following configuration settings are supported by `MailerFactory`:
* `server`: smtp server host and port, defaults to `localhost:25`
* `username`: user name to login, empty by default
* `password`: user name to login, empty by default
* `transport`: `SMTP_PLAIN` (default) or `SMTP_TLS`
# Maven Artifacts
This project is not yet available on Maven Central. You have to clone it and
install it in your local maven repository. To add it to your project simply add
the following dependencies to your `pom.xml`:
io.dropwizard.modules
dropwizard-smtp-mail
1.0.0-1-SNAPSHOT
# Support
Please file bug reports and feature requests in [GitHub issues](https://github.com/msteinhoff/dropwizard-smtp-mail/issues).
# License
Copyright (c) 2016 Mario Steinhoff
This library is licensed under the Apache License, Version 2.0.
See http://www.apache.org/licenses/LICENSE-2.0.html or the LICENSE file in this repository for the full license text.