simple mail library with DBFlute and Java8
This library should be collaborated with FreeGen of DBFlute like e.g. LastaFlute:
/*
[New Member's Registration]
The member will be formalized after click.
*/
subject: Welcome to your sign up, /*pmb.memberName*/
>>>
Hello, /*pmb.memberName*/
How are you?
/*IF pmb.birthdate != null*/
Happy birthdate! Today is /*pmb.birthdate*/.
/*END*/
Thanks
after that, execute DBFlute FreeGen task, and the class will be generated...
// e.g. WelcomeMemberPostcard, generated from 'welcome_member.dfmail'
WelcomeMemberPostcard.droppedInto(postbox, postcard -> {
postcard.setFrom("from@example.com", LABELS_OFFICE_MAIL);
postcard.addTo("to@example.com");
postcard.setMemberName("sea");
postcard.setBirthdate(birthdate);
postcard.addReplyTo("replyto@example.com");
});
EMecha (Eclipse plugin) supports MailFlute mail template .dfmail:
https://dbflute-emecha.github.io
*It is very useful if you use MailFlute.
Can boot it by example of LastaFlute:
*ReplaceSchema
// call manage.sh at lastaflute-example-harbor/dbflute_maihamadb
// and select replace-schema in displayed menu
...$ sh manage.sh
*main() method
public class HarborBoot {
public static void main(String[] args) {
new JettyBoot(8090, "/harbor").asDevelopment().bootAwait();
}
}
<dependency>
<groupId>org.dbflute.mail</groupId>
<artifactId>mailflute</artifactId>
<version>0.6.5</version>
</dependency>
Apache License 2.0
Japanese site:
http://dbflute.seasar.org/ja/manual/function/helper/mailflute/index.html
MailFlute is used by: