def send_email(self): "Send email" email = EmailMessage(self) if self.stream and self.stream.outgoing_server_name: email.send_email()