Mercurial > p > roundup > code
comparison roundup/cgi/client.py @ 2248:cd7e6d6288c6
fixed rego from email address [SF#947414]
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 04 May 2004 05:56:54 +0000 |
| parents | 9db7d2842222 |
| children | 297e46e22e04 7a2e55a59928 |
comparison
equal
deleted
inserted
replaced
| 2247:7d5398391610 | 2248:cd7e6d6288c6 |
|---|---|
| 1 # $Id: client.py,v 1.175 2004-05-04 00:02:18 richard Exp $ | 1 # $Id: client.py,v 1.176 2004-05-04 05:56:54 richard Exp $ |
| 2 | 2 |
| 3 """WWW request handler (also used in the stand-alone server). | 3 """WWW request handler (also used in the stand-alone server). |
| 4 """ | 4 """ |
| 5 __docformat__ = 'restructuredtext' | 5 __docformat__ = 'restructuredtext' |
| 6 | 6 |
| 668 if hasattr(self, 'db'): | 668 if hasattr(self, 'db'): |
| 669 self.db.close() | 669 self.db.close() |
| 670 self.db = self.instance.open(user) | 670 self.db = self.instance.open(user) |
| 671 | 671 |
| 672 def standard_message(self, to, subject, body, author=None): | 672 def standard_message(self, to, subject, body, author=None): |
| 673 '''Send a standard email message from Roundup. | |
| 674 | |
| 675 "to" - recipients list | |
| 676 "subject" - Subject | |
| 677 "body" - Message | |
| 678 "author" - (name, address) tuple or None for admin email | |
| 679 | |
| 680 Arguments are passed to the Mailer.standard_message code. | |
| 681 ''' | |
| 673 try: | 682 try: |
| 674 self.mailer.standard_message(to, subject, body, author) | 683 self.mailer.standard_message(to, subject, body, author) |
| 675 return 1 | |
| 676 except MessageSendError, e: | 684 except MessageSendError, e: |
| 677 self.error_message.append(str(e)) | 685 self.error_message.append(str(e)) |
| 686 return 0 | |
| 687 return 1 | |
| 678 | 688 |
| 679 def parsePropsFromForm(self, create=0): | 689 def parsePropsFromForm(self, create=0): |
| 680 return FormParser(self).parse(create=create) | 690 return FormParser(self).parse(create=create) |
| 681 | 691 |
