Changeset 10944 for main/waeup.kofa


Ignore:
Timestamp:
20 Jan 2014, 15:08:37 (11 years ago)
Author:
Henrik Bettermann
Message:

Do not send copy to portal admin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/smtp.py

    r10855 r10944  
    164164
    165165    mailer = getUtility(IMailService)
    166     rcpt_addrs += [from_addr]
     166    try:
     167        email_admin = grok.getSite()['configuration'].email_admin
     168        if from_addr != email_admin:
     169            rcpt_addrs += [from_addr]
     170    except TypeError:
     171        # In tests we might not have a site object
     172        rcpt_addrs += [from_addr]
     173        pass
    167174    result = mailer().send(from_addr, rcpt_addrs, body.as_string())
    168175    return result
Note: See TracChangeset for help on using the changeset viewer.