All Downloads are FREE. Search and download functionalities are using the official Maven repository.

play.libs.mail.DefaultMailSystemFactory Maven / Gradle / Ivy

There is a newer version: 2.6.2
Show newest version
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;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy