Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
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
Kirill Smelkov
Zope
Commits
9e334a81
Commit
9e334a81
authored
Jun 08, 2001
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
e524462a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
doc/CHANGES.txt
doc/CHANGES.txt
+2
-0
lib/python/Products/MailHost/MailHost.py
lib/python/Products/MailHost/MailHost.py
+14
-3
No files found.
doc/CHANGES.txt
View file @
9e334a81
...
...
@@ -50,6 +50,8 @@ Zope Changes
- Collector #2289: leading \n\r inside messageText broke
mail headers
- Collector #2290: better handling of subject header in Mailhost.py
Zope 2.4 alpha 1
Features Added
...
...
lib/python/Products/MailHost/MailHost.py
View file @
9e334a81
...
...
@@ -84,8 +84,8 @@
##############################################################################
"""SMTP mail objects
$Id: MailHost.py,v 1.6
2 2001/06/08 11:29:07
andreas Exp $"""
__version__
=
"$Revision: 1.6
2
$"
[
11
:
-
2
]
$Id: MailHost.py,v 1.6
3 2001/06/08 13:30:35
andreas Exp $"""
__version__
=
"$Revision: 1.6
3
$"
[
11
:
-
2
]
from
Globals
import
Persistent
,
DTMLFile
,
HTML
,
MessageDialog
from
smtplib
import
SMTP
...
...
@@ -206,9 +206,15 @@ class MailBase(Acquisition.Implicit, OFS.SimpleItem.Item, RoleManager):
messageText
=
messageText
.
lstrip
()
if
not
headers
[
'subject'
]:
if
not
headers
[
'subject'
]
and
len
(
headers
)
==
0
:
messageText
=
"subject: %s
\
n
\
n
%s"
%
(
subject
or
'[No Subject]'
,
messageText
)
elif
not
headers
[
'subject'
]:
messageText
=
"subject: %s
\
n
%s"
%
(
subject
or
'[No Subject]'
,
messageText
)
if
mto
:
if
type
(
mto
)
is
type
(
's'
):
mto
=
map
(
string
.
strip
,
string
.
split
(
mto
,
','
))
...
...
@@ -224,8 +230,13 @@ class MailBase(Acquisition.Implicit, OFS.SimpleItem.Item, RoleManager):
smtpserver
=
SMTP
(
self
.
smtp_host
,
self
.
smtp_port
)
smtpserver
.
sendmail
(
headers
[
'from'
],
headers
[
'to'
],
messageText
)
def
scheduledSend
(
self
,
messageText
,
mto
=
None
,
mfrom
=
None
,
subject
=
None
,
encode
=
None
):
"""Looks like the same function as send() - scheduledSend() is nowhere
used in Zope. No idea if it is still needed/used (ajung)
"""
headers
=
extractheaders
(
messageText
)
if
not
headers
[
'subject'
]:
...
...
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