i'm trying to send multiple email with ajax in multiple request to my PHP script,
and i need it to be in the same SMTP connection,when i tried with $mail->SMTPKeepAlive = true
the script open and close the smtp connection for every request.
there is a way to keep the connection alive until the end of my requests ?
No, you can't do that. PHP tears down the connection every time. You might be able to do it with something like swoole or reactphp which makes PHP act more like an application server, but PHP doesn't work this way out of the box.
The next question is why do you need to work this way? You're unlikely to see much performance improvement by doing this anyway - any gain would be offset by the ajax call overhead. Can you not provide the list of addresses in one go and send them all at once?