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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yoji Takeuchi
erp5
Commits
88d40b40
Commit
88d40b40
authored
Mar 31, 2017
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Notification: use email.utils.formataddr instead of reimplementing it
parent
6edd92c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
product/ERP5/Tool/NotificationTool.py
product/ERP5/Tool/NotificationTool.py
+2
-2
No files found.
product/ERP5/Tool/NotificationTool.py
View file @
88d40b40
...
...
@@ -40,6 +40,7 @@ from email.mime.text import MIMEText
from
email.mime.base
import
MIMEBase
from
email.mime.audio
import
MIMEAudio
from
email.mime.image
import
MIMEImage
from
email.utils
import
formataddr
from
email.header
import
make_header
from
email
import
encoders
...
...
@@ -333,8 +334,7 @@ class NotificationTool(BaseTool):
default_from_name
=
getattr
(
portal
,
'email_from_name'
,
default_from_name
)
if
from_person
is
None
:
# when sending without sender defined compose identifiable From header
low_level_kw
[
'from_url'
]
=
'%s <%s>'
%
(
default_from_name
,
default_from_email
)
low_level_kw
[
'from_url'
]
=
formataddr
((
default_from_name
,
default_from_email
))
if
not
to_person_list
:
low_level_kw
[
'to_url'
]
=
default_to_email
if
attachment_list
is
not
None
:
...
...
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