<commit_before>from email.mime.text import MIMEText
from subprocess import Popen, PIPE
import commands
def send_mail(sender, recevier, subject, html_content):
    msg = MIMEText(html_content, 'html', 'utf-8')
    msg["From"] = sender
    msg["To"] = recevier
    msg["Subject"] = subject
    p = Popen(["/usr/sbin/sendmail", "-t"], stdin=PIPE)  
    p.communicate(msg.as_string())  
def main():
    send_mail("<EMAIL>","<EMAIL>","Mail From Python", "Hello World")

if __name__ == '__main__':
    main()<commit_msg>sendmail<commit_after>from email.mime.text import MIMEText
from subprocess import Popen, PIPE
import commands

## 读取TXT的数据
def readHtml():
    file_object = open('/home/wangr/python/PythonFiles/demo1.html')
    try:
        html = file_object.read()
        return html
    finally:
        file_object.close()


def send_mail(sender, recevier, subject, html_content):
    msg = MIMEText(html_content, 'html', 'utf-8')
    msg["From"] = sender
    msg["To"] = recevier
    msg["Subject"] = subject
    p = Popen(["/usr/sbin/sendmail", "-t"], stdin=PIPE)  d
    p.communicate(msg.as_string())  
def main():
    html = readHtml()
    # send_mail("<EMAIL>","<EMAIL>","Mail From Python", "<a href='http://www.cnblogs.com/miraclewong/'>Miracle Wong</a>")
    # send_mail("<EMAIL>","<EMAIL>","Mail From Python", "Hello World")
    send_mail("<EMAIL>","<EMAIL>","Mail From Python", html)

if __name__ == '__main__':
    main()
{'fraction_non_alphanumeric': 0.17376133984647593, 'fraction_numerical': 0.00209351011863224, 'mean_word_length': 4.067137809187279, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '471237', 'n_tokens_mistral': 507, 'n_tokens_neox': 504, 'n_words': 108}