First of all I want to thank P_dog89gt for being the only one who tried to help and/or contribute to this thread, and for anybody else that will benefit from the solution I will write below, help other people, I can't believe the lack of responses or suggestions about my problem :S.
Also for boonex, stop telling everybody that they don't know how to set a cron job, when the thing that is wrong is in the code, at least take the time to check the code instead of assuming that nobody knows how to set a cron job correctly.
There were several problems with my mass mailer:
1- subscribers emails were correctly added to queue, but message to them were never delivered, entries just kept in the queue forever.
2- members emails were not being added to queue.
3- messages to members emails were never delivered, entries just kept in the queue forever
Ok, now how I solved all these:
1)
At ...periodic/notifies.php
Below:
Add:Code:$total_per_query = $total_count / 4 + 1;
Code:$total_per_query = round( $total_per_query );
2)
At admin/notifies.php
Check this line:
And replace where it says:Code:$res_eml = db_res("SELECT `ID` FROM `Profiles` WHERE `Status` <> 'Unconfirmed' AND `EmailNotify` = 'NotifyMe' $sex_filter_sql $age_filter_sql $country_filter_sql");
It should become:Code:NotifyMe with Notify_Me
Code:$res_eml = db_res("SELECT `ID` FROM `Profiles` WHERE `Status` <> 'Unconfirmed' AND `EmailNotify` = 'Notify_Me' $sex_filter_sql $age_filter_sql $country_filter_sql");
3)
At periodic/notifies.php
Check this line:
And replace where it says:Code:$nfs_res = db_res("SELECT NotifyQueue.Email as ID1, NotifyQueue.Msg as ID2, Profiles.RealName 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' AND Profiles.EmailFlag = 'HTML'",0);
It should become:Code:NotifyMe with Notify_Me
Code:$nfs_res = db_res("SELECT NotifyQueue.Email as ID1, NotifyQueue.Msg as ID2, Profiles.RealName 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 = 'Notify_Me' AND Profiles.EmailFlag = 'HTML'",0);
Check this line:
And replace where it says:Code:$nfs_res = db_res("SELECT NotifyQueue.Email as ID1, NotifyQueue.Msg as ID2, Profiles.RealName as Name, Profiles.Email, NotifyMsgs.Subj, NotifyMsgs.Text 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' AND Profiles.EmailFlag <> 'HTML'",0);
It should become:Code:NotifyMe with Notify_Me
Code:$nfs_res = db_res("SELECT NotifyQueue.Email as ID1, NotifyQueue.Msg as ID2, Profiles.RealName as Name, Profiles.Email, NotifyMsgs.Subj, NotifyMsgs.Text 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 = 'Notify_Me' AND Profiles.EmailFlag <> 'HTML'",0);
Check this line:
And replace where it says:Code:$nfs_res = db_res("SELECT NotifyQueue.Email as ID1, NotifyQueue.Msg as ID2, NotifyQueue.MsgText as Body, NotifyQueue.MsgSubj as Subj, Profiles.RealName as Name, Profiles.Email FROM NotifyQueue INNER JOIN Profiles ON (Profiles.ID = NotifyQueue.Email) WHERE NotifyQueue.`From` = 'ProfilesMsgText' AND Profiles.EmailNotify = 'NotifyMe'",0);
It should become:Code:NotifyMe with Notify_Me
That fixed everything for me.Code:$nfs_res = db_res("SELECT NotifyQueue.Email as ID1, NotifyQueue.Msg as ID2, NotifyQueue.MsgText as Body, NotifyQueue.MsgSubj as Subj, Profiles.RealName as Name, Profiles.Email FROM NotifyQueue INNER JOIN Profiles ON (Profiles.ID = NotifyQueue.Email) WHERE NotifyQueue.`From` = 'ProfilesMsgText' AND Profiles.EmailNotify = 'Notify_Me'",0);


LinkBack URL
About LinkBacks



Reply With Quote

Bookmarks