Skip to content

Commit

Permalink
[CueGUI] Encode email MIMEText with plain utf-8. (#977)
Browse files Browse the repository at this point in the history
  • Loading branch information
roulaoregan-spi committed May 21, 2021
1 parent ec40fe0 commit e4b6d65
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cuegui/cuegui/EmailDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def email_subject(self):

def email_body(self):
"""Get the email body text."""
return "%s" % self.__email_body.toPlainText().toAscii()
return "%s" % self.__email_body.toPlainText()

def appendToBody(self, txt):
"""Appends text to the email body."""
Expand All @@ -295,8 +295,8 @@ def sendEmail(self):
"""Sends the email."""
self.send.emit()

msg = MIMEText(self.email_body())
msg["Subject"] = Header(self.email_subject(), continuation_ws=' ')
msg = MIMEText(self.email_body(), 'plain', 'utf-8')
msg["Subject"] = Header(self.email_subject(), 'utf-8', continuation_ws=' ')
msg["To"] = self.email_to()
msg["From"] = self.email_from()
msg["Cc"] = self.email_cc()
Expand Down

0 comments on commit e4b6d65

Please sign in to comment.