Send email when a user has finished watching something
Create an end point for your ajax request to call using hook_menu(). In this example I'm passing the UID of the user as an argument.

E.g:

/**
* Implementation of hook_menu().
*/
function myModule_menu() {
  $items['mymodule/send-email/%user'] = array(
    'page callback' =&gt; 'myModule_ajax_send_email',
    'page arguments' =&gt; array(2),
    'type' =&gt; MENU_CALLBACK,
    'access arguments' =&gt; array('access content'),
  );
  return $items;
}


The callback for your menu item will be responsible for actually sending the email. See this question: How to send email in drupal

E.g.:

function myModule_ajax_send_email($user) {

  // Here you put the code to actually send the email
  $status = some_logic_to_check_email_sent();

  drupal_json(array('status' =&gt; $status));
}


So then once your video has finished playing you just need to make an ajax request to your new end point, passing any information required as parameters.
E.g:

(function($) {
    Drupal.behaviors.myModule = {
        'attach': function(context) {

            jwplayer('some-id-of-video').onComplete(function(){ 
              //$.ajax or .post whatever to send email to a person to let them know without refreshing page 
              var UID = 1; // actually set UID here
              var url = 'mymodule/send-email/' + UID;
              $.get(url, null, emailCallback);
            });

        }
    }
    var emailCallback = function(response) {
        var result = Drupal.parseJson(response);
        if(result.status !== 1) {
          // Some code to let user know there was an error
        }
    }
})(jQuery);