def styleEmail(e): subject = Email.getSubject(e, self.profile) if Email.isEchoEmail(e, self.profile): if Email.isNewEmail(e): return subject.replace('[echo]', '') else: return "" sender = Email.getSender(e) return "您有来自 %s 的新邮件 %s" % (sender, subject)
def styleEmail(e): subject = Email.getSubject(e, self.profile) if Email.isEchoEmail(e, self.profile): if Email.isNewEmail(e): return subject.replace('[echo]', '') else: return "" elif Email.isControlEmail(e, self.profile): self.brain.query([subject.replace('[control]', '') .strip()], None, True) return "" sender = Email.getSender(e) return "您有来自 %s 的新邮件 %s" % (sender, subject)
def styleEmail(e): subject = Email.getSubject(e, self.profile) if '[echo]' in subject: return subject.replace('[echo]', '') sender = Email.getSender(e) return "您有来自 %s 的新邮件 %s" % (sender, subject)