Code Duplication    Length = 14-14 lines in 2 locations

chezbetty/utility.py 2 locations

@@ 95-108 (lines=14) @@
92
    _send_email(msg, FROM)
93
94
95
def send_bcc_email(BCC, SUBJECT, body,
96
        FROM='[email protected]',
97
        encoding='html',
98
        ):
99
    msg = MIMEMultipart()
100
    msg['Subject'] = SUBJECT
101
    msg['From'] = FROM
102
    msg['BCC'] = BCC
103
    if encoding == 'text':
104
        msg.attach(MIMEText(body))
105
    else:
106
        msg.attach(MIMEText(body, encoding))
107
    print(msg.as_string())
108
    _send_email(msg, FROM)
109
110
111
def user_password_reset(user):
@@ 79-92 (lines=14) @@
76
    sm.quit()
77
78
79
def send_email(TO, SUBJECT, body,
80
        FROM='[email protected]',
81
        encoding='html',
82
        ):
83
    msg = MIMEMultipart()
84
    msg['Subject'] = SUBJECT
85
    msg['From'] = FROM
86
    msg['To'] = TO
87
    if encoding == 'text':
88
        msg.attach(MIMEText(body))
89
    else:
90
        msg.attach(MIMEText(body, encoding))
91
    print(msg.as_string())
92
    _send_email(msg, FROM)
93
94
95
def send_bcc_email(BCC, SUBJECT, body,