class_docstr: The Emails Table implementation
class_docstr_tok: ["The","Emails","Table","implementation"]
docstr: Sends emails through the connected account.
  
  Parameters
  ----------
  query : ast.Insert
     Given SQL INSERT query
  
  Returns
  -------
  None
  
  Raises
  ------
  ValueError
      If the query contains an unsupported condition
docstr_tok: ["Sends","emails","through","the","connected","account",".","Parameters","--","--","--","--","--","query",":","ast.Insert","Given","SQL","INSERT","query","Returns","--","--","--","-","None","Raises","--","--","--","ValueError","If","the","query","contains","an","unsupported","condition"]
code: def insert(self, query: ast.Insert) -> None:
      """Sends emails through the connected account.
  
      Parameters
      ----------
      query : ast.Insert
         Given SQL INSERT query
  
      Returns
      -------
      None
  
      Raises
      ------
      ValueError
          If the query contains an unsupported condition
      """
      insert_statement_parser = INSERTQueryParser(
          query,
          supported_columns=["to", "subject", "body"],
          mandatory_columns=["to", "subject", "body"],
          all_mandatory=True,
      )
      email_data = insert_statement_parser.parse_query()
  
      for email in email_data:
          connection = self.handler.connect()
          to_addr = email["to"]
          del email["to"]
          connection.send_email(to_addr, **email)
  
file_path: mindsdb/mindsdb/integrations/handlers/email_handler/email_tables.py
imports: import datetime
  import ast
  import pytz
  import pandas
  from mindsdb_sql.parser import ast
  from mindsdb.integrations.libs.api_handler import APITable
  from mindsdb.integrations.handlers.utilities.query_utilities import SELECTQueryParser, SELECTQueryExecutor
  from mindsdb.integrations.handlers.utilities.query_utilities.insert_query_utilities import INSERTQueryParser
label_desc: Use image node_id 2 for calling the EmailsTable obj's underlying member method code with example usage: obj.insert(query) without return types