<commit_before>/*
 * Copyright 2016 E-System LLC
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

package com.es.lib.common.email.config;

import java.util.HashMap;
import java.util.Map;

/**
 * @author <NAME> - <EMAIL>
 * @since 16.05.16
 */
public class SMTPServerConfiguration extends EmailServerConfiguration {

    public static final int DEFAULT_SSL_PORT = 465;

    public static final Map<String, EmailServer> PRESETS = new HashMap<>();

    static {
        PRESETS.put(
            "gmail",
            new EmailServer(
                "smtp.gmail.com",
                DEFAULT_SSL_PORT,
                true
            )
        );
        PRESETS.put(
            "gmail_tls",
            new EmailServer(
                "smtp.gmail.com",
                DEFAULT_SSL_PORT,
                false,
                true
            )
        );
        PRESETS.put(
            "mailru",
            new EmailServer(
                "smtp.mail.ru",
                DEFAULT_SSL_PORT,
                true
            )
        );
        PRESETS.put(
            "mailru_tls",
            new EmailServer(
                "smtp.mail.ru",
                DEFAULT_SSL_PORT,
                false,
                true
            )
        );
        PRESETS.put(
            "yandex",
            new EmailServer(
                "smtp.yandex.ru",
                DEFAULT_SSL_PORT,
                true
            )
        );

        PRESETS.put(
            "yandex_tls",
            new EmailServer(
                "smtp.yandex.ru",
                DEFAULT_SSL_PORT,
                false,
                true
            )
        );
    }

    public SMTPServerConfiguration(EmailServer server, EmailAuth auth) {
        super(EmailServerType.SMTP, server, auth);
    }

    public SMTPServerConfiguration(EmailServer server, EmailAuth auth, Map<String, Object> parameters, boolean debug) {
        super(EmailServerType.SMTP, server, auth, parameters, debug);
    }

    public SMTPServerConfiguration(EmailServerType serverType, EmailServer server, EmailAuth auth) {
        super(serverType, server, auth);
    }

    public SMTPServerConfiguration(EmailServerType serverType, EmailServer server, EmailAuth auth, Map<String, Object> parameters, boolean debug) {
        super(serverType, server, auth, parameters, debug);
    }
}<commit_msg>Change port<commit_after>/*
 * Copyright 2016 E-System LLC
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

package com.es.lib.common.email.config;

import java.util.HashMap;
import java.util.Map;

/**
 * @author <NAME> - <EMAIL>
 * @since 16.05.16
 */
public class SMTPServerConfiguration extends EmailServerConfiguration {

    public static final int DEFAULT_SSL_PORT = 465;
    public static final int DEFAULT_TLS_PORT = 587;

    public static final Map<String, EmailServer> PRESETS = new HashMap<>();

    static {
        PRESETS.put(
            "gmail",
            new EmailServer(
                "smtp.gmail.com",
                DEFAULT_SSL_PORT,
                true
            )
        );
        PRESETS.put(
            "gmail_tls",
            new EmailServer(
                "smtp.gmail.com",
                DEFAULT_TLS_PORT,
                false,
                true
            )
        );
        PRESETS.put(
            "mailru",
            new EmailServer(
                "smtp.mail.ru",
                DEFAULT_SSL_PORT,
                true
            )
        );
        PRESETS.put(
            "mailru_tls",
            new EmailServer(
                "smtp.mail.ru",
                DEFAULT_TLS_PORT,
                false,
                true
            )
        );
        PRESETS.put(
            "yandex",
            new EmailServer(
                "smtp.yandex.ru",
                DEFAULT_SSL_PORT,
                true
            )
        );

        PRESETS.put(
            "yandex_tls",
            new EmailServer(
                "smtp.yandex.ru",
                DEFAULT_TLS_PORT,
                false,
                true
            )
        );
    }

    public SMTPServerConfiguration(EmailServer server, EmailAuth auth) {
        super(EmailServerType.SMTP, server, auth);
    }

    public SMTPServerConfiguration(EmailServer server, EmailAuth auth, Map<String, Object> parameters, boolean debug) {
        super(EmailServerType.SMTP, server, auth, parameters, debug);
    }

    public SMTPServerConfiguration(EmailServerType serverType, EmailServer server, EmailAuth auth) {
        super(serverType, server, auth);
    }

    public SMTPServerConfiguration(EmailServerType serverType, EmailServer server, EmailAuth auth, Map<String, Object> parameters, boolean debug) {
        super(serverType, server, auth, parameters, debug);
    }
}
{'fraction_non_alphanumeric': 0.08196721311475409, 'fraction_numerical': 0.006318306010928962, 'mean_word_length': 1.6732085805568233, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '377599', 'n_tokens_mistral': 1609, 'n_tokens_neox': 1514, 'n_words': 425}