Commit 8171ca3c authored by Aurel's avatar Aurel

follow of commit cabb7eae

check must be done on email address part only, not the formatted address
parent 79f3b8bd
......@@ -665,11 +665,14 @@ class EmailDocument(TextDocument):
# To (multiple)
to_url_list = set()
to_email_list = []
if to_url is None:
for recipient in self.getDestinationValueList():
email = recipient.getDefaultEmailText()
if email:
to_url_list.add(formataddr((recipient.getTitle(), email)))
if email not in to_email_list:
to_email_list.append(email)
to_url_list.add(formataddr((recipient.getTitle(), email)))
else:
raise ValueError, 'Recipient %s has no defined email' % recipient
if not to_url_list:
......
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