I have had a search about and cant find what im looking for.
I want to extend the code a bit in the PIREPData.Class.php to also send a summary to the pilot upon sending in a pirep.
This is the send to admin email notification of a new pirep
# Send an email to the admin that a PIREP was submitted
$sub = "A PIREP has been submitted by {$pilotcode} ({$pirepdata['depicao']} - {$pirepdata['arricao']})";
$message = "A PIREP has been submitted by {$pilotcode} "
."({$pilotinfo->firstname} {$pilotinfo->lastname})\n\n"
."{$pirepdata['code']}{$pirepdata['flightnum']}: {$pirepdata['depicao']} to {$pirepdata['arricao']}\n"
."Aircraft: {$pirepdata['aircraft']}\n" . "Flight Time: {$pirepdata['flighttime']}\n"
."Landing Rate: {$pirepdata['landingrate']}\n"."Filed using: {$pirepdata['source']}\n\n"
."Comment: {$comment}\n\n"
."Click to approve this pirep (admin must be signed in):\n"
.adminurl('/pirepadmin/approvepirep/'.$pirepid);
$email = Config::Get('EMAIL_NEW_PIREP');
if (empty($email)) {
$email = ADMIN_EMAIL;
}
Util::SendEmail($email, $sub, $message);
}
Clearly i would not want to send that approve link to the pilot so i can remove that no problem, would it just be a simple case of adding $pilotinfo->email to that Util?