Kaynağa Gözat

Error mail: Sets charset to utf-8 by default (Issue #2737)

Ask Solem 9 yıl önce
ebeveyn
işleme
78b053c720
3 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  1. 1 1
      celery/app/defaults.py
  2. 1 1
      celery/utils/mail.py
  3. 1 1
      docs/configuration.rst

+ 1 - 1
celery/app/defaults.py

@@ -139,7 +139,7 @@ NAMESPACES = Namespace(
         backend_settings=Option(None, type='dict'),
     ),
     email=Namespace(
-        charset=Option('us-ascii'),
+        charset=Option('utf-8'),
         host=Option('localhost'),
         host_user=Option(),
         host_password=Option(),

+ 1 - 1
celery/utils/mail.py

@@ -42,7 +42,7 @@ class SendmailWarning(UserWarning):
 class Message(object):
 
     def __init__(self, to=None, sender=None, subject=None,
-                 body=None, charset='us-ascii'):
+                 body=None, charset='utf-8'):
         self.to = maybe_list(to)
         self.sender = sender
         self.subject = subject

+ 1 - 1
docs/configuration.rst

@@ -1930,7 +1930,7 @@ email_charset
 ~~~~~~~~~~~~~
 .. versionadded:: 4.0
 
-Charset for outgoing emails. Default is "us-ascii".
+Charset for outgoing emails. Default is "utf-8".
 
 .. _conf-example-error-mail-config: