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
c876b050
Commit
c876b050
authored
Jan 15, 2002
by
Jens Vagelpohl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small corrections
parent
44f0e9ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
lib/python/Products/MailHost/MailHost.py
lib/python/Products/MailHost/MailHost.py
+3
-4
lib/python/Products/MailHost/SendMailTag.py
lib/python/Products/MailHost/SendMailTag.py
+3
-3
No files found.
lib/python/Products/MailHost/MailHost.py
View file @
c876b050
...
...
@@ -12,8 +12,8 @@
##############################################################################
"""SMTP mail objects
$Id: MailHost.py,v 1.6
8 2002/01/15 04:45:13
jens Exp $"""
__version__
=
"$Revision: 1.6
8
$"
[
11
:
-
2
]
$Id: MailHost.py,v 1.6
9 2002/01/15 14:58:37
jens Exp $"""
__version__
=
"$Revision: 1.6
9
$"
[
11
:
-
2
]
from
Globals
import
Persistent
,
DTMLFile
,
InitializeClass
from
smtplib
import
SMTP
...
...
@@ -162,7 +162,6 @@ class MailBase(Acquisition.Implicit, OFS.SimpleItem.Item, RoleManager):
"""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'
]:
...
...
@@ -198,7 +197,7 @@ class MailBase(Acquisition.Implicit, OFS.SimpleItem.Item, RoleManager):
security
.
declarePrivate
(
'_send'
)
def
_send
(
self
,
headers
,
body
):
""" Send the message """
smtpserver
=
SMTP
(
self
.
smtp_host
,
self
.
smtp_port
)
smtpserver
=
SMTP
(
self
.
smtp_host
,
int
(
self
.
smtp_port
)
)
smtpserver
.
sendmail
(
headers
[
'from'
],
headers
[
'to'
],
body
)
smtpserver
.
quit
()
...
...
lib/python/Products/MailHost/SendMailTag.py
View file @
c876b050
...
...
@@ -10,8 +10,8 @@
# FOR A PARTICULAR PURPOSE
#
##############################################################################
__rcs_id__
=
'$Id: SendMailTag.py,v 1.1
4 2002/01/15 04:23:08
jens Exp $'
__version__
=
'$Revision: 1.1
4
$'
[
11
:
-
2
]
__rcs_id__
=
'$Id: SendMailTag.py,v 1.1
5 2002/01/15 14:58:37
jens Exp $'
__version__
=
'$Revision: 1.1
5
$'
[
11
:
-
2
]
from
MailHost
import
MailBase
from
DocumentTemplate.DT_Util
import
parse_params
,
render_blocks
...
...
@@ -109,7 +109,7 @@ class SendMailTag:
if
self
.
mailhost
:
mhost
=
md
[
self
.
mailhost
]
elif
self
.
smtphost
:
mhost
=
MailBase
(
s
elf
.
smtphost
,
self
.
port
)
mhost
=
MailBase
(
s
mtp_host
=
self
.
smtphost
,
smtp_port
=
self
.
port
)
mhost
.
send
(
render_blocks
(
self
.
section
.
blocks
,
md
),
self
.
mailto
,
self
.
mailfrom
,
...
...
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