Skip to content

Commit

Permalink
[AIRFLOW-2696] Setting UTF-8 as default mime_charset mail
Browse files Browse the repository at this point in the history
update UPDATING.md

Closes #3559 from lxneng/feature/utf8_mime_charset
  • Loading branch information
lxneng authored and Fokko Driesprong committed Jul 1, 2018
1 parent 89c1f53 commit 985a433
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ assists users migrating to a new version.

## Airflow Master

### Setting UTF-8 as default mime_charset in email utils

### Add a configuration variable(default_dag_run_display_number) to control numbers of dag run for display
Add a configuration variable(default_dag_run_display_number) under webserver section to control num of dag run to show in UI.

Expand Down
4 changes: 2 additions & 2 deletions airflow/utils/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

def send_email(to, subject, html_content,
files=None, dryrun=False, cc=None, bcc=None,
mime_subtype='mixed', mime_charset='us-ascii', **kwargs):
mime_subtype='mixed', mime_charset='utf-8', **kwargs):
"""
Send email using backend specified in EMAIL_BACKEND.
"""
Expand All @@ -55,7 +55,7 @@ def send_email(to, subject, html_content,

def send_email_smtp(to, subject, html_content, files=None,
dryrun=False, cc=None, bcc=None,
mime_subtype='mixed', mime_charset='us-ascii',
mime_subtype='mixed', mime_charset='utf-8',
**kwargs):
"""
Send an email with html content
Expand Down
2 changes: 1 addition & 1 deletion tests/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2429,7 +2429,7 @@ def test_custom_backend(self, mock_send_email):
utils.email.send_email('to', 'subject', 'content')
send_email_test.assert_called_with(
'to', 'subject', 'content', files=None, dryrun=False,
cc=None, bcc=None, mime_charset='us-ascii', mime_subtype='mixed')
cc=None, bcc=None, mime_charset='utf-8', mime_subtype='mixed')
self.assertFalse(mock_send_email.called)


Expand Down

0 comments on commit 985a433

Please sign in to comment.