-1
I’m developing a system where I send email to several users, where it sends the email and changes the SEND column in the data stack to true with a range of 10 seconds between each shipment. So I tried to simulate a power outage, and my perception would be. " Well lacked power so it will stop sending emails and also will not change the column in mysql". However what I realized and that even with the closed browser he still kept doing the loop, sending the email and updating the column in mysql, so clearly think, this is great, and came to me the curiosity, php and mysql in the case continue to work in the background, I mean with the whole system closed? Just one remark, I’m newly born in PHP
Follow the code:
foreach ($result as $key => $value) {
$nameUser = $value['userName'];
$email = $value['userEmail'];
$headers = "From: $nameD $addressee \r\n";
$headers .= "Return-Path: $nameD $addressee \r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$html = str_replace("true", "false", $bodyEmail);
mail($email, '=?UTF-8?B?' . base64_encode($subjects) . '?=', str_replace("nomedousuario", "$nameUser", $html), $headers);
$update = $conn->prepare("UPDATE $tableName SET send = 'true', selectionType = 'noSelect' WHERE userEmail = '$email'");
$update->execute();
sleep(10);
}
Wrong is not, I do not understand why so much negative...
– MagicHat
much less me...
– Eduardo Lopes