Lines 127-133
Link Here
|
127 |
myconn = smtplib.SMTP(mymailhost, mymailport) |
127 |
myconn = smtplib.SMTP(mymailhost, mymailport) |
128 |
if mymailuser != "" and mymailpasswd != "": |
128 |
if mymailuser != "" and mymailpasswd != "": |
129 |
myconn.login(mymailuser, mymailpasswd) |
129 |
myconn.login(mymailuser, mymailpasswd) |
130 |
myconn.sendmail(myfrom, myrecipient, message.as_string()) |
130 |
msg = _unicode_encode(message.as_string(), |
|
|
131 |
encoding=_encodings['content'], errors='backslashreplace') |
132 |
myconn.sendmail(myfrom, myrecipient, msg) |
131 |
myconn.quit() |
133 |
myconn.quit() |
132 |
except smtplib.SMTPException as e: |
134 |
except smtplib.SMTPException as e: |
133 |
raise portage.exception.PortageException(_("!!! An error occured while trying to send logmail:\n")+str(e)) |
135 |
raise portage.exception.PortageException(_("!!! An error occured while trying to send logmail:\n")+str(e)) |