How to hook into a function offered by a plugin?

Using add_action I am able to add a function to the plugin.

// add action to after_record_action    
add_action('after_record_action', 'marian_rick_custom_action', 10, 3);

// add function
function marian_rick_custom_action ($result, $data, $format){
    // get data from $data[] array
    $email = $data['email'];
    $key = $data['key'];

    // use $data to create a personalized mail
    $to = $email;
    $subject = "Wordpress Test";
    $content = "Hi, this us your key:" . $key . "Enjoy using it!";

    // send mail using wp_mail
    $status = wp_mail($to, $subject, $content);
}

As stated here by Tarun Mahashwari