Merge pull request #42 from djl/content_type_fix

NotifyEmail.py / Use 'plain' instead of 'text' for mime subtype; refs #41
This commit is contained in:
lead2gold 2019-01-30 14:46:36 -05:00 committed by GitHub
commit ba27267563
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -352,11 +352,9 @@ class NotifyEmail(NotifyBase):
# Prepare Email Message # Prepare Email Message
if self.notify_format == NotifyFormat.HTML: if self.notify_format == NotifyFormat.HTML:
email = MIMEText(body, 'html') email = MIMEText(body, 'html')
email['Content-Type'] = 'text/html'
else: else:
email = MIMEText(body, 'text') email = MIMEText(body, 'plain')
email['Content-Type'] = 'text/plain'
email['Subject'] = title email['Subject'] = title
email['From'] = '%s <%s>' % (from_name, self.from_addr) email['From'] = '%s <%s>' % (from_name, self.from_addr)