03-04-2008, 01:47 AM
I have a job posting software, and I would like to integrate with php_mm. I would like to email the entire users database when a new job posting is available. Would something like this work to email only active users?
Code:
$result = queryDatabase("SELECT * FROM mm_users");
while ($row = mysql_fetch_object($result)) {
$message = "Hello $row->name,\n\nA new job posting has been added to " . COMPANY . "'s website, please click the link below to view this job posting:\n\n" . HOME . "\n\nThank you,\n" . COMPANY . "\n\nWebsite Management - " . date('m/d/Y');
mail($row->email, 'New Job Posting Added', $message, 'From:');
}
Thanks for any assistance.