Hãy thử một cái gì đó như sau:
<?php
function sendEmailTech() {
$select = $this->pdo->query("SELECT email FROM tbl_tech_email");
$select = $select->fetchAll();
if(count($select) > 0) {
foreach($select AS $recipient) {
mail($recipient["email"], "My Info", "Hello, I just sent a mail to You");
}
} else {
echo "No user to send email";
die();
}
}
// sendEmailTech();
?>