Changeset - aa555c93a66f
[Not reviewed]
0 1 0
Lance Edgar - 9 years ago 2015-12-06 12:29:38
ledgar@sacfoodcoop.com
Don't warn when sending HTML-only email messages.

Not sure if that's really an undesirable thing to do...
1 file changed with 0 insertions and 4 deletions:
0 comments (0 inline, 0 general)
rattail/mail.py
Show inline comments
 
@@ -27,7 +27,6 @@ Email Framework
 
from __future__ import unicode_literals, absolute_import
 

	
 
import smtplib
 
import warnings
 
import logging
 
from email.message import Message
 
from email.mime.multipart import MIMEMultipart
 
@@ -282,9 +281,6 @@ class Email(object):
 
                msg = MIMEText(_text=txt_template.render(**data), _charset='utf_8')
 

	
 
        elif html_template:
 
            warnings.warn("Sending HTML-only email does not conform with standards, "
 
                          "please add a TXT template for '{0}' emails.".format(self.key),
 
                          DeprecationWarning)
 
            if attachments:
 
                msg = MIMEMultipart(_subtype='mixed', _subparts=[
 
                    MIMEText(_text=html_template.render(**data), _subtype='html', _charset='utf_8'),
0 comments (0 inline, 0 general)