#!/usr/bin/perl

BEGIN { use lib '/usr/home/cfg' ; require push_inc ; }

use MIME::Lite;
use Mail::Sendmail;
    
require cfg ;

print "Content-type: text/html\n\n";

&today ;

our $debug = 1 ;

#------------------------------------------------------------------------------------------

# https://aisadmin.co.za/cgi-bin/aisa/scripts/admin/oneoff/sendmailv5.pl

use CGI::Carp qw(fatalsToBrowser);

# my $message = "Hi Kre8IT,
# <br><br>
# Your match analysis is now complete and ready for review in your analytics channel.
# <br><br>
# Match details:<br>
# Date: 2026-02-02<br>
# Event name: K8Test<br>
# Sport: Rugby<br>
# Age group: u15<br>
# Coding type: Primary
# <br><br>
# You can now log in and begin reviewing the analysis, clips, and insights with your team.
# <br><br>
# <a href='https://www.isportsanalysis.com/clubs-video-channel/'><img src='https://$ENV{SERVER_NAME}/img/isports.jpg'><br>AI Sport Africa Analytics</a>
# <br><br>
# If you have any questions or would like feedback adjusted or expanded, please don’t hesitate to get in touch.
# <br><br>
# Kind regards,<br>
# AI Sport Africa Analytics<br>
# $email_analytics" ;

$email{$event_id}{$row_cnt}{date} = '2026-02-02' ;
$event_name = 'K8TEST' ;
$sport = 'Rugby' ; 
$age_group = 'u/15' ;
$coding_type = 'Primary' ;

my $hmsg = qq~Hi Kre8IT,<br><br>Your match analysis is now complete and ready for review in your analytics channel.~;
my $tmsg = qq~<tr><th colspan='2'>&nbsp;Match details&nbsp;</th></tr>
<tr><td>&nbsp;<b>Date:</b>&nbsp;</td><td>&nbsp;$email{$event_id}{$row_cnt}{date}&nbsp;</td></tr>
<tr><td>&nbsp;<b>Event name:</b>&nbsp;</td><td>&nbsp;$event_name&nbsp;</td></tr>
<tr><td>&nbsp;<b>Sport:</b>&nbsp;</td><td>&nbsp;$sport&nbsp;</td></tr>
<tr><td>&nbsp;<b>Age group:</b>&nbsp;</td><td>&nbsp;$age_group&nbsp;</td></tr>
<tr><td>&nbsp;<b>Coding type:</b>&nbsp;</td><td>&nbsp;$coding_type&nbsp;</td></tr>
~ ;

our $display_notif_msg = qq~You can now log in and begin reviewing the analysis, clips, and insights with your team.
<br><br>
<a href='https://www.isportsanalysis.com/clubs-video-channel/'><img src='https://$ENV{SERVER_NAME}/img/isports.jpg'><br>AI Sport Africa Analytics</a>
<br><br>
If you have any questions or would like feedback adjusted or expanded, please don’t hesitate to get in touch.
<br><br>
AI Sport Africa Analytics
<br>
$email_analytics
</p><p>~ ;

&common_send_smtp_mail('',$email_it_1,'','',"Match Analysis Event 1001 Fixture 1",$hmsg,$tmsg,'html') ;

exit ;

#------------------------------------------------------------------------------------------

use today ;
use common ;

1;