<commit_before>#!/usr/bin/env python
# -*- coding: UTF-8 -*-

from email.mime.text import MIMEText
from quant import config
import smtplib

mail_to = ["<EMAIL>"]
mail_host = "smtp.163.com"
mail_user = "<EMAIL>"
'''163邮箱smtp生成的密码'''
mail_pass = config.EMAIL_PASSWORD_163
mail_subject = 'logging'


def send_mail(content):
    me = "QuantBot" + "<" + mail_user + ">"
    msg = MIMEText(_text=content, _subtype='plain', _charset='utf-8')
    msg['Subject'] = mail_subject
    msg['From'] = me
    msg['To'] = ";".join(mail_to)
    try:
        server = smtplib.SMTP()
        server.connect(mail_host)
        server.login(mail_user, mail_pass)
        server.sendmail(me, mail_to, msg.as_string())
        server.close()
        return True
    except Exception as e:
        print (e)
        return False


if __name__ == '__main__':
    # for test
    send_mail('content')<commit_msg>Temp forbid smtp email feature<commit_after>#!/usr/bin/env python
# -*- coding: UTF-8 -*-

from email.mime.text import MIMEText
from quant import config
import smtplib

mail_to = ["<EMAIL>"]
mail_host = "smtp.163.com"
mail_user = "<EMAIL>"
'''163邮箱smtp生成的密码'''
mail_pass = config.EMAIL_PASSWORD_<PASSWORD>
mail_subject = 'logging'


def send_mail(content):
    pass
    # me = "QuantBot" + "<" + mail_user + ">"
    # msg = MIMEText(_text=content, _subtype='plain', _charset='utf-8')
    # msg['Subject'] = mail_subject
    # msg['From'] = me
    # msg['To'] = ";".join(mail_to)
    # try:
    #     server = smtplib.SMTP()
    #     server.connect(mail_host)
    #     server.login(mail_user, mail_pass)
    #     server.sendmail(me, mail_to, msg.as_string())
    #     server.close()
    #     return True
    # except Exception as e:
    #     print (e)
    #     return False


if __name__ == '__main__':
    # for test
    send_mail('content')
{'fraction_non_alphanumeric': 0.15330060010911076, 'fraction_numerical': 0.010365521003818877, 'mean_word_length': 3.066518847006652, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '626274', 'n_tokens_mistral': 684, 'n_tokens_neox': 670, 'n_words': 136}