First, I've seen this question: Send mail without blocking 'execution'
But, I need to know why PHP is not a multi-threading process but has no problem if two people try to connect at the same time.
I am calling the mail script by an Ajax call actually :
$.ajax({
url: 'sendMailTemplate.php',
type: 'POST',
data: formData,
processData: false,
contentType: false,
success: function (data) {}
...
My problem with PHP mailer is that, when I'm sending an email if this takes 10 seconds, then for 10 seconds i can't use any feature of my website ( and the website is like down for everyone for 10 seconds). Should I try to use cron jobs? Is there any tutorial for PHP mailer + cron jobs? What's the best way other than cron jobs?