thx gilbau, i follow your instruction but i ha also on line 152 as u can see below, i change both is that right?
if ( $count_ok < $total_count ) {
// Profiles Messages
$nfs_res = db_res("
SELECT
NotifyQueue.Email as ID1,
NotifyQueue.Msg as ID2,
Profiles.NickName as Name,
Profiles.Email,
NotifyMsgs.Subj,
NotifyMsgs.HTML as Body
FROM NotifyQueue
INNER JOIN NotifyMsgs ON
(NotifyMsgs.ID = NotifyQueue.Msg)
INNER JOIN Profiles ON
(Profiles.ID = NotifyQueue.Email)
WHERE
NotifyQueue.`From` = 'Profiles' AND
Profiles.EmailNotify = 'NotifyMe'
",0 );
while( $row = mysql_fetch_array( $nfs_res ) )
{
$headers = "From: {$site['title']} <{$site['email_notify']}>";
$headers = "MIME-Version: 1.0\r\n" . "Content-type: text/html; charset=UTF-8\r\n" . $headers;
if ( !mail( $row['Email'], $row['Subj'], $row['Body'], $headers, "-f{$site['email_notify']}") )
++$err;
if ( $row[ID1] && $row[ID2] )
db_res("DELETE FROM NotifyQueue WHERE Email = $row[ID1] AND Msg = $row[ID2] AND NotifyQueue.`From` = 'Profiles'", 0 );
else
echo "ERROR: while deleting from 'NotifyQueue' ( Email ID: $row[ID1], Msg ID: $row[ID2] )\n";
++$count_ok;
if ( $count_ok >= $total_count ) break;
}
}
if ( $count_ok < $total_count ) {
// Profiles Messages
$nfs_res = db_res("
SELECT
NotifyQueue.Email as ID1,
NotifyQueue.Msg as ID2,
NotifyQueue.MsgText as Body,
NotifyQueue.MsgSubj as Subj,
Profiles.NickName as Name,
Profiles.Email
FROM NotifyQueue
INNER JOIN Profiles ON
(Profiles.ID = NotifyQueue.Email)
WHERE
NotifyQueue.`From` = 'ProfilesMsgText' AND
Profiles.EmailNotify = 'NotifyMe'
",0);