diff --git a/src/bika/aquaculture/browser/overrides/overrides.zcml b/src/bika/aquaculture/browser/overrides/overrides.zcml index 3b2e991..e7cbd76 100644 --- a/src/bika/aquaculture/browser/overrides/overrides.zcml +++ b/src/bika/aquaculture/browser/overrides/overrides.zcml @@ -13,12 +13,6 @@ layer="bika.lims.interfaces.IBikaLIMS" /> - ".join(lab_address), - "number_of_samples": number_of_samples, - "recipients": ", ".join([i.getFullname() for i in contacts]), - } - ) - - return compose_email( - from_addr=lab_email, - to_addr=recipients, - subj=subject, - body=body, - html=True, - ) - - def get_email_address(self, contact_user_email): - """Returns the email address for the contact, member or email - """ - if is_valid_email_address(contact_user_email): - return contact_user_email - - if IContact.providedBy(contact_user_email): - contact_email = contact_user_email.getEmailAddress() - return self.get_email_address(contact_email) - - if isinstance(contact_user_email, MemberData): - contact_user_email = contact_user_email.getUser() - - if isinstance(contact_user_email, PloneUser): - # Try with the contact's email first - contact = api.get_user_contact(contact_user_email) - contact_email = self.get_email_address(contact) - if contact_email: - return contact_email - - # Fallback to member's email - user_email = contact_user_email.getProperty("email") - return self.get_email_address(user_email) - - return None