def _get_from_email(self, event): from_email = get_from_author(self.env, event) if from_email and isinstance(from_email, tuple): from_email = from_email[1] if not from_email: from_email = self.config.get('notification', 'smtp_from') or \ self.config.get('notification', 'smtp_replyto') return from_email
def _get_message_id(self, event, newticket=None): ticket = event.target from_email = get_from_author(self.env, event) if from_email and isinstance(from_email, tuple): from_email = from_email[1] if not from_email: from_email = self.config.get('notification', 'smtp_from') or \ self.config.get('notification', 'smtp_replyto') modtime = None if newticket else event.time return create_message_id(self.env, '%08d' % ticket.id, from_email, modtime, ticket['reporter'] or '')