def check_requirements(self):
        if self.use_ssl:
            server = smtplib.SMTP_SSL(self.host, self.port)
        else:
            server = smtplib.SMTP(self.host, self.port)
        server.ehlo()
        if self.use_starttls:
            server.starttls()
            server.ehlo()
        try:
            if self.login_required:
                server.login(self.fromuser, self.frompwd)
        except Exception as ex:
            _logger.error("Cannot connect to your SMTP account. "
                          "Correct your config and try again. Error details:")
            _logger.error(ex)
            raise
        _logger.info("SMTP server check passed")
Logs in to SMTP server to check credentials and settings
dataset/ETHPy150Open MA3STR0/kimsufi-crawler/notifiers/email_notifier.py/EmailNotifier.check_requirements