From 5b530aa1db8ce1365a643bd44937493809f7be00 Mon Sep 17 00:00:00 2001
From: Romain Courteaud <romain@nexedi.com>
Date: Mon, 11 Feb 2008 10:01:51 +0000
Subject: [PATCH] email_to_address property does not exist on portal by
 default, so, keep compatibility with existing site.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19221 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Tool/NotificationTool.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/product/ERP5/Tool/NotificationTool.py b/product/ERP5/Tool/NotificationTool.py
index 19ec2e59a1..c3dcb6b25a 100644
--- a/product/ERP5/Tool/NotificationTool.py
+++ b/product/ERP5/Tool/NotificationTool.py
@@ -166,7 +166,8 @@ class NotificationTool(BaseTool):
     # Default Values
     portal = self.getPortalObject()
     default_from_email = portal.email_from_address
-    default_to_email = portal.email_to_address
+    default_to_email = getattr(portal, 'email_to_address',
+                               default_from_email)
 
     # Change all strings to object values
     if isinstance(sender, basestring):
-- 
2.30.9