java.lang.Object
io.jooby.commons.mail.CommonsMailModule
- All Implemented Interfaces:
Extension
commons email.
Small but helpful module that provides access to Email instances via the service
registry and Config.
usage
application.conf:mail.hostName = smtp.googlemail.com mail.ssl.onConnect = true mail.username = username mail.password = password mail.from = user@gmail.com mail.subject = TestMail
{
install(new CommonsEmailModule());
get("/send", ctx -> {
require(SimpleEmail.class)
.setMsg("you got an email!")
.setTo("foo@bar.com")
.send();
});
}
That's all it does! Every time you require an email, it creates one and setup properties from
mail.*.
- Since:
- 2.8.9
- Author:
- edgar
-
Constructor Summary
ConstructorsConstructorDescriptionCreates aCommonsMailModule.CommonsMailModule(String name) Creates aCommonsMailModule. -
Method Summary
-
Constructor Details
-
CommonsMailModule
Creates aCommonsMailModule.- Parameters:
name- Name of the property who has the mail information. Default is:mail.*.
-
CommonsMailModule
public CommonsMailModule()Creates aCommonsMailModule.
-
-
Method Details