Skip to content

Commit

Permalink
Catch MailHostErrors when sending email.
Browse files Browse the repository at this point in the history
svn path=/Products.Poi/branches/1.2/; revision=238898
  • Loading branch information
mauritsvanrees committed May 9, 2011
1 parent 2f8c7aa commit 43bc9c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Products/Poi/HISTORY.txt
Expand Up @@ -5,7 +5,8 @@ Changelog for Poi
1.2.13 (unreleased)
-------------------

- Nothing changed yet.
- Catch MailHostErrors when sending email.
[maurits]


1.2.12 (2011-05-05)
Expand Down
3 changes: 2 additions & 1 deletion Products/Poi/content/PoiTracker.py
Expand Up @@ -50,6 +50,7 @@
from AccessControl import Unauthorized
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone.utils import log_exc, log
from Products.MailHost.MailHost import MailHostError
from Products.PageTemplates.GlobalTranslationService import \
getGlobalTranslationService

Expand Down Expand Up @@ -441,7 +442,7 @@ def sendNotificationEmail(self, addresses, subject, rstText):
mfrom = mfrom,
subject = subject,
charset = charset)
except (socket.error, SMTPException), exc:
except (socket.error, SMTPException, MailHostError), exc:
log_exc(('Could not send email from %s to %s regarding issue '
'in tracker %s\ntext is:\n%s\n') % (
mfrom, address, self.absolute_url(), email_msg))
Expand Down

0 comments on commit 43bc9c0

Please sign in to comment.