Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
190820a8
Commit
190820a8
authored
Aug 12, 2011
by
Julien Muchembled
Browse files
Options
Browse Files
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
Show 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,9 +134,12 @@ def buildEmailMessage(from_url, to_url, msg=None,
...
@@ -134,9 +134,12 @@ 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
)
if
subject
:
message
.
add_header
(
'Subject'
,
message
.
add_header
(
'Subject'
,
make_header
([(
subject
,
'utf-8'
)]).
encode
())
make_header
([(
subject
,
'utf-8'
)]).
encode
())
if
from_url
:
message
.
add_header
(
'From'
,
from_url
)
message
.
add_header
(
'From'
,
from_url
)
if
to_url
:
message
.
add_header
(
'To'
,
to_url
)
message
.
add_header
(
'To'
,
to_url
)
for
attachment
in
attachment_list
:
for
attachment
in
attachment_list
:
...
...
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