Answer the question
In order to leave comments, you need to log in
Sending a mail message in PHP in a separate "thread". Implementation methods?
The question has probably already been ridden more than once, and judging by the title, everyone will think "well, again." But in fact, it is not about how to send a mail message in PHP, you can use mail, you can use phpmailer, there are a lot of ways. Question about something else. Let's say we have an abstract function send_message(...) inside which sending email is implemented in one way or another. What is the best way to do it in a separate "thread" (the thread is not in quotation marks for nothing, because PHP does not support multithreading). Suppose we have a script like:
<?php
echo "Begin ... \r\n";
send_message(...);
echo "End ... \r\n";
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question