def get_new_mail(self, condition=None):
new_mail = []<EOL>connection = self.get_connection()<EOL>if not connection:<EOL><INDENT>return<EOL><DEDENT>for message in connection.get_message(condition):<EOL><INDENT>msg = self.process_incoming_message(message)<EOL>if not msg is None:<EOL><INDENT>yield msg<EOL><DEDENT><DEDENT>self.last_polling = now()<EOL>if django.VERSION >= (<NUM_LIT:1>, <NUM_LIT:5>):  <EOL><INDENT>self.save(update_fields=['<STR_LIT>'])<EOL><DEDENT>else:<EOL><INDENT>self.save()<EOL><DEDENT>
Connect to this transport and fetch new messages.