code: def send(self, msg_string, immediate=True):
          
          try:
              mailhost = api.get_tool("MailHost")
              mailhost.send(msg_string, immediate=immediate)
          except SMTPException as e:
              logger.error(e)
              return False
          except socket.error as e:
              logger.error(e)
              return False
          return True
docs: Send the email via the MailHost tool