def _send_email(self, title, content):
        if not self.config.get('email'):
            return

        import smtplib
        from email.mime.text import MIMEText

        msg = MIMEText(content)
        msg['Subject'] = title
        msg['From'] = self.config['email']['from']['username']
        msg['To'] = ', '.join(self.config['email']['to'])

        # Send the message via our own SMTP server.
        s = smtplib.SMTP()
        s.connect(self.config['email']['from']['host'])
        s.login(user=self.config['email']['from']['username'],
                password=self.config['email']['from']['password'])
        s.sendmail(msg['From'], msg['To'], msg=msg.as_string())
        s.quit()
Read only access to the read preference of this instance.
dataset/ETHPy150Open zhongbiaodev/py-mysql-elasticsearch-sync/es_sync/__init__.py/ElasticSync._send_email--crossover with--dataset/ETHPy150Open mongodb/mongo-python-driver/pymongo/common.py/BaseObject.read_preference