コード例 #1
0
ファイル: controllers.py プロジェクト: qroques/indico
 def _process(self):
     include_summary = request.form.get('include_summary') == '1'
     tpl = make_reminder_email(self.event, include_summary,
                               request.form.get('message'))
     html = render_template('events/reminders/preview.html',
                            subject=tpl.get_subject(),
                            body=tpl.get_body())
     return jsonify(html=html)
コード例 #2
0
ファイル: reminders.py プロジェクト: indico/indico
 def send(self):
     """Sends the reminder to its recipients."""
     self.is_sent = True
     recipients = self.all_recipients
     if not recipients:
         logger.info('Notification %s has no recipients; not sending anything', self)
         return
     email_tpl = make_reminder_email(self.event, self.include_summary, self.include_description, self.message)
     email = make_email(bcc_list=recipients, from_address=self.reply_to_address, template=email_tpl)
     send_email(email, self.event, 'Reminder', self.creator)
コード例 #3
0
 def send(self):
     """Sends the reminder to its recipients."""
     self.is_sent = True
     recipients = self.all_recipients
     if not recipients:
         logger.info('Notification %s has no recipients; not sending anything', self)
         return
     email_tpl = make_reminder_email(self.event_new, self.include_summary, self.message)
     email = make_email(bcc_list=recipients, from_address=self.reply_to_address, template=email_tpl)
     send_email(email, self.event_new, 'Reminder', self.creator)
コード例 #4
0
ファイル: reminders.py プロジェクト: javfg/indico
    def send(self):
        """Send the reminder to its recipients."""
        self.is_sent = True
        recipients = self.all_recipients
        if not recipients:
            logger.info('Notification %s has no recipients; not sending anything', self)
            return
        email_tpl = make_reminder_email(self.event, self.include_summary, self.include_description, self.message)
        attachments = []
        if self.attach_ical:
            event_ical = event_to_ical(self.event, skip_access_check=True, method='REQUEST',
                                       organizer=(core_settings.get('site_title'), config.NO_REPLY_EMAIL))
            attachments.append(MIMECalendar('event.ics', event_ical))

        for recipient in recipients:
            email = self._make_email(recipient, email_tpl, attachments)
            send_email(email, self.event, 'Reminder', self.creator, log_metadata={'reminder_id': self.id})
コード例 #5
0
 def send(self):
     """Send the reminder to its recipients."""
     self.is_sent = True
     recipients = self.all_recipients
     if not recipients:
         logger.info(
             'Notification %s has no recipients; not sending anything',
             self)
         return
     email_tpl = make_reminder_email(self.event, self.include_summary,
                                     self.include_description, self.message)
     attachments = []
     if self.attach_ical:
         event_ical = event_to_ical(self.event)
         attachments.append(('event.ics', event_ical, 'text/calendar'))
     email = make_email(bcc_list=recipients,
                        from_address=self.reply_to_address,
                        template=email_tpl,
                        attachments=attachments)
     send_email(email, self.event, 'Reminder', self.creator)
コード例 #6
0
 def _process(self):
     tpl = make_reminder_email(self.event, request.form.get('include_summary') == '1', request.form.get('message'))
     html = render_template('events/reminders/preview.html', subject=tpl.get_subject(), body=tpl.get_body())
     return jsonify(html=html)
コード例 #7
0
ファイル: controllers.py プロジェクト: k3njiy/indico
 def _process(self):
     tpl = make_reminder_email(self.event, request.form.get("include_summary") == "1", request.form.get("message"))
     html = render_template("events/reminders/preview.html", subject=tpl.get_subject(), body=tpl.get_body())
     return jsonify(html=html)