Help creating action Here is the code I currently have:

function mymodule_action_info() {
  return array(
  'mymodule_send_mail_admin_action' =&gt; array(
  'type' =&gt; 'node',
  'label' =&gt; t('Send a mail to administration warning insertion and deletion of nodes.'),
  'configurable' =&gt; FALSE,
  'triggers' =&gt; array('node_insert', 'node_delete'),
  ),
);
}

function mymodule_send_mail_admin_action($object, $context) {


if ($context['hook'] == 'node_insert') {}

//if ($context['hook'] == 'node_delete') {}
    }

What should I put inside the mymodule_send_mail_admin_action function? How should I complete it?

Note: I need to write a function for this (not use rules).
You don't need to create this action programmatically. You can simply use the Rules UI.  I'm pasting an export of a sample Rule that does this. You can import it using the Rules UI import link.

{ "rules_email_administrators_when_new_node" : {
    "LABEL" : "Email administrators when new node",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules" ],
    "ON" : { "node_insert" : [], "node_delete" : [] },
    "DO" : [
      { "mail_to_users_of_role" : {
          "roles" : { "value" : { "3" : "3" } },
          "subject" : "Node added or modified.",
          "message" : "Hi, administrator(s),\r\n\r\nA node has been added or deleted.\r\n\r\nNode ID: [node:nid]\r\nNode title: [node:title]\r\n\r\n"
        }
      }
    ]
  }
}


EDIT: Now, if you MUST do this programmatically, I would first look at the Examples for Developers project (it contains an action example). In a nutshell:


First, I would use dpm($context); and 'dpm($object); to see what parameters are being passed to the function. You can probably use some of the information there to include in the email, like the node ID and the author ID.
Then I would load an array of administrator users, maybe using EntityFieldQuery or a db_query. 
Then I would use drupal_mail() to send the email. It shouldn't be hard to do.