Sending email in a record action

require_once 'include/SugarPHPMailer.php';

where should i put this line if i want to send email in a record action

Before class or in the function like shown in the below code: