Ignore:
Timestamp:
4 Nov 2020, 22:25:27 (4 years ago)
Author:
Henrik Bettermann
Message:

Configure Cc and Bcc properly.

File:
1 edited

Legend:

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

    r16299 r16300  
    350350        entries.sort()
    351351        deleted = []
    352         emails_tobesent = ''
     352        emails_tobesent = []
    353353        for entry in entries:
    354354            if 'remove' in form:
     
    356356                deleted.append(entry)
    357357            if 'send_email' in form and self.context[entry].email:
    358                 emails_tobesent += '%s,' % encode_address(
     358                emails_tobesent.append((
    359359                    self.context[entry].email,
    360                     self.context[entry].student_id)
     360                    self.context[entry].student_id))
    361361        if 'send_email' in form and not len(emails_tobesent):
    362362            self.flash(_('No email address found.'), type="warning")
    363363            return
    364364        if len(emails_tobesent):
    365             args = {'bcc_to': emails_tobesent.strip(',')}
     365            args = {'bcc_to': emails_tobesent}
    366366            self.redirect(self.url(self.context) +
    367367                '/send_bulk_email?%s' % urlencode(args))
     
    570570                self.config.name,
    571571                data['body'],data['subject'],
    572                 data['bcc_to'])
     572                eval(data['bcc_to'])
     573                )
    573574        if success:
    574575            self.flash(_('Your message has been sent.'))
Note: See TracChangeset for help on using the changeset viewer.