play.libs.mail.DefaultMailSystemFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of framework Show documentation
Show all versions of framework Show documentation
RePlay is a fork of the Play1 framework, created by Codeborne.
package play.libs.mail;
import play.Play;
import play.libs.mail.test.LegacyMockMailSystem;
class DefaultMailSystemFactory extends AbstractMailSystemFactory {
private static final MailSystem LEGACY_MOCK_MAIL_SYSTEM = new LegacyMockMailSystem();
private static final MailSystem PRODUCTION_MAIL_SYSTEM = new ProductionMailSystem();
@Override
public MailSystem currentMailSystem() {
if (Play.useDefaultMockMailSystem()) {
return LEGACY_MOCK_MAIL_SYSTEM;
} else {
return PRODUCTION_MAIL_SYSTEM;
}
}
}