<commit_before># -*- encoding: UTF-8 -*-

from django.conf import settings as st
from django.core.mail import EmailMessage
from smtplib import SMTPRecipientsRefused
from django.template import Template, Context
import logging
from mailing.models import Email
import mailing.settings as st_mail
from mensajeria import Mensajeria

logger = logging.getLogger('default')


def send_mail(email_code, email_to):
    email = Email.objects.get(entry_type=email_code.value)
    template = Template(email.content)
    context = Context({})
    content = template.render(context)
    if st.EMAIL_DEBUG:
        email_to = st_mail.EMAIL_DEBUG_ADDRESS
    m = Mensajeria(username=st_mail.MENSAJERIA_USERNAME,
                   password=<PASSWORD>,
                   sender_id=st_mail.EMAIL_SENDER_NAME)
    m.send_email(to=email_to,
                 subject=email.title,
                 body=content,
                 input_html=True)<commit_msg>Removed unused imports<commit_after># -*- encoding: UTF-8 -*-

from django.conf import settings as st
from django.template import Template, Context
import logging
from mailing.models import Email
import mailing.settings as st_mail
from mensajeria import Mensajeria

logger = logging.getLogger('default')


def send_mail(email_code, email_to):
    email = Email.objects.get(entry_type=email_code.value)
    template = Template(email.content)
    context = Context({})
    content = template.render(context)
    if st.EMAIL_DEBUG:
        email_to = st_mail.EMAIL_DEBUG_ADDRESS
    m = Mensajeria(username=st_mail.MENSAJERIA_USERNAME,
                   password=st_<PASSWORD>.<PASSWORD>,
                   sender_id=st_mail.EMAIL_SENDER_NAME)
    m.send_email(to=email_to,
                 subject=email.title,
                 body=content,
                 input_html=True)
{'fraction_non_alphanumeric': 0.08448371065709552, 'fraction_numerical': 0.0011043622308117063, 'mean_word_length': 3.1559633027522938, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '7350667', 'n_tokens_mistral': 543, 'n_tokens_neox': 529, 'n_words': 115}