예제 #1
0
 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)
예제 #2
0
 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)