Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
preetwinder
erp5
Commits
190820a8
Commit
190820a8
authored
13 years ago
by
Julien Muchembled
Browse files
Options
Download
Email Patches
Plain Diff
NotificationTool: do not add empty Subject:; To: or From: fields
We might want to rely on MailHost for filling those fields.
parent
fa908d78
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
product/ERP5/Tool/NotificationTool.py
product/ERP5/Tool/NotificationTool.py
+7
-4
No files found.
product/ERP5/Tool/NotificationTool.py
View file @
190820a8
...
@@ -134,10 +134,13 @@ def buildEmailMessage(from_url, to_url, msg=None,
...
@@ -134,10 +134,13 @@ def buildEmailMessage(from_url, to_url, msg=None,
for
key
,
value
in
additional_headers
.
items
():
for
key
,
value
in
additional_headers
.
items
():
message
.
add_header
(
key
,
value
)
message
.
add_header
(
key
,
value
)
message
.
add_header
(
'Subject'
,
if
subject
:
make_header
([(
subject
,
'utf-8'
)]).
encode
())
message
.
add_header
(
'Subject'
,
message
.
add_header
(
'From'
,
from_url
)
make_header
([(
subject
,
'utf-8'
)]).
encode
())
message
.
add_header
(
'To'
,
to_url
)
if
from_url
:
message
.
add_header
(
'From'
,
from_url
)
if
to_url
:
message
.
add_header
(
'To'
,
to_url
)
for
attachment
in
attachment_list
:
for
attachment
in
attachment_list
:
attachment_name
=
attachment
.
get
(
'name'
,
''
)
attachment_name
=
attachment
.
get
(
'name'
,
''
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment