How Do I Send A Custom Email Tpl?

I want to send an email to the vendor right after they apply just to confirm that their application has been received.

From the original code and from the Event Notifications documentation, I know I should use Tygh::$app['mailer'], there are some parameters that I'm not quite sure what info to put in.

This is the default cs cart code that notifies the admin of a new vendor application:

        $mailer->send(array(
            'to' => 'default_company_users_department',
            'from' => 'default_company_users_department',
            'data' => array(
                'company_id' => $company_id,
                'company' => $data,
                'company_update_url' => fn_url('companies.update?company_id=' . $company_id, 'A', 'http')
            ),
            'template_code' => 'apply_for_vendor_notification',
            'tpl' => 'companies/apply_for_vendor_notification.tpl', // this parameter is obsolete and is used for back compatibility
        ), 'A', Registry::get('settings.Appearance.backend_default_language'));

My code, which goes right after that looks like this:

	$mailer->send(array(
            'to' => $data[email],
            'from' => 'default_company_users_department',
            'data' => array(
                'company_id' => $company_id,
                'company' => $data,
            ),
            'template_code' => 'application_notification',
            'tpl' => 'companies/application_notification.tpl', // this parameter is obsolete and is used for back compatibility
        ), 'C', Registry::get('settings.Appearance.backend_default_language'));

application_notification.tpl being the custom tpl file I made. But it's getting an error and not loading the tpl file. It's stored in /mail/templates/companies in the frontend design folder.

I also changed the AREA parameter to 'C' instead of 'A', I'm not sure if that does anything. I'm using the old email template system by the way. Is the 'tpl' parameter supposed to be absolute path or relative to somewhere?

Remove the template_code parameter. In this case the system will not search template from database and will use file system

design/themes/responsive/mail/templates/companies/application_notification.tpl