do not send phpmailer mail when I use ajax with javascript values

My issuer where I generate the data that I will use for the edition

function edit (event) {
                start = event.start.format ('YYYY-MM-DD');
                if (event.end) {
                    end = event.end.format ('YYYY-MM-DD');
                } else {
                    end = start;
                }

                id = event.id;
                title = event.title;
                Event = [];
                Event[0] = id;
                Event[1] = start;
                Event[2] = end;
                Event[3] = title;


                $ .ajax ({
                 url: 'editEventDate.php',
                 type: "POST",
                 data: {Event: Event},
                 success: function (rep) {
                        if (rep == 'OK') {

    swal ({
      position: 'top-end',
      type: 'success',
      title: 'modified correctly',
      showConfirmButton: false,
      timer: 1500
    });


                        }

finish

My receiver where I include the phpmailer library and check that the data is not empty

I checked that the update of my database is done but the email is not sent …
I can use the library in any other part of my system but in the ajax query no.

connect_errno) {

        echo "Connection failed:". $ connection-> connect_error;
    }

    $ user = new User ();

    $ query = $ user-> searchUser ($ connection, $ _SESSION['ticket_id']);

    $ result = $ query-> fetch_array (MYSQLI_ASSOC);

    $ ticket = new Ticket ();

    $ ticket-> setIdUser ($ _ SESSION['ticket_id']);


    if (isset ($ _ POST['Event'][0]) && isset ($ _ POST)['Event'][1]) && isset ($ _ POST)['Event'][2]) && isset ($ _ POST)['Event'][3])) {


        $ id = $ _POST['Event'][0];
        $ start = $ _POST['Event'][1];
        $ end = $ _POST['Event'][2];
        $ title = $ _POST['Event'][3];



        $ sql = "UPDATE events SET start = '$ start', end = '$ end' WHERE id = $ id";


        $ query = $ bdd-> prepare ($ sql);
        if ($ query == false) {
         print_r ($ bdd-> errorInfo ());
         die ('Erreur prepare');
        }
        $ sth = $ query-> execute ();
        if ($ sth == false) {
         print_r ($ query-> errorInfo ());
         die ('Erreur execute');
        } else {
            die ('OK');
        }

    $ mail = new PHPMailer (); // create a new object
    $ mail-> IsSMTP (); // enable SMTP
    $ mail-> SMTPDebug = 0; // debugging: 1 = errors and messages, 2 = messages only
    $ mail-> SMTPAuth = true; // authentication enabled
    $ mail-> SMTPSecure = 'tls'; // secure transfer enabled REQUIRED for GMail
    $ mail-> Host = "smtp.gmail.com"; // last
    $ mail-> Port = 587; // or 465
    $ mail-> IsHTML (true);
    $ mail-> Username = "@ gmail.com"; // last
    $ mail-> Password = "."; // last
    $ mail-> SetFrom ("@ gmail.com", "Systems"); // last
    $ mail-> Subject = "Attention! The time of the event has been modified:". $ _ POST['title'];
    $ mail-> Body = "

        
Modified event
Hello team, I am ". $ result['personaNombre']. "". $ result['apellido']. ",
I inform you about a change in the time of the event, here the info:
Event time ". $ _ POST['hora']. "
Thank you very much for your support :)
";     $ mail-> CharSet = 'UTF-8';     $ mail-> AddAddress ("@ gmail.com"); // is the email address where we send a copy of what happened     $ mail-> Send ();     }     // header ('Location:'. $ _ SERVER['HTTP_REFERER']);     ?>