Commit 9d82bbdc authored by Jeffrey Shell's avatar Jeffrey Shell

updated with icon

parent b920982c
......@@ -2,8 +2,8 @@ from Globals import Persistent, HTMLFile, HTML
from socket import *
import Acquisition, sys, regex, string
#$Id: MailForm.py,v 1.3 1997/09/09 16:09:13 jeffrey Exp $
__version__ = "$Revision: 1.3 $"[11:-2]
#$Id: MailForm.py,v 1.4 1997/09/09 18:40:34 jeffrey Exp $
__version__ = "$Revision: 1.4 $"[11:-2]
smtpError = "SMTP Error"
addForm=HTMLFile('MailForm/addMailForm_form')
......@@ -25,6 +25,7 @@ class MailForm(Persistent, Acquisition.Implicit):
'a mailform...?'
manage=HTMLFile('MailForm/manageMailForm')
index_html=HTMLFile('MailForm/mailForm')
icon="MailForm/MailForm_icon.gif"
def __init__(self):
'nothing yet'
......@@ -60,16 +61,18 @@ class MailForm(Persistent, Acquisition.Implicit):
raise MailFormError, "Message missing SMTP Header '%s'" \
% requiredHeader
SendMail(self.smtpHost, self.smtpPort, self.localHost).send(
SendMail(trueself.smtpHost, trueself.smtpPort,
trueself.localHost).send(
mfrom=headers['from'], mto=headers['to'],
subj=headers['subject'], body=messageText)
subj=headers['subject'], body=messageText
)
return getattr(self,self.sentMailTemplate)(self, self.REQUEST,
messageText=message)
def trueSend(trueself, self=None, REQUEST=None, **kw):
if REQUEST: kw=REQUEST
if not self: self=trueself
if self == None: self=trueself
if kw.has_key('d_template'):
mtemplate = getattr(self, kw['d_template'])
else:
......@@ -90,6 +93,11 @@ class MailForm(Persistent, Acquisition.Implicit):
return getattr(trueself,trueself.sentMailTemplate)(self, kw,
messageText=message)
def kwikHack(self, mfid, REQUEST):
'quick and ugly hack to test da system'
jj=getattr(self, mfid)
return jj.trueSend(self=self, REQUEST=REQUEST)
class SendMail:
def __init__(self, smtpHost, smtpPort, localHost="localhost"):
self.conn = socket(AF_INET, SOCK_STREAM)
......@@ -171,6 +179,6 @@ def decapitate(message,
return headerDict, body
#$Log: MailForm.py,v $
#Revision 1.3 1997/09/09 16:09:13 jeffrey
#minor fixings
#Revision 1.4 1997/09/09 18:40:34 jeffrey
#updated with icon
#
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment