SMF 1.1.3
Users can specify if they want to receive announcements via e-mail (Profile --> Announcements and E-Mail --> sent e-mail-notification when there is a new announcement). "Announcement" in this case seems to be equal with "newsletter", so I will talk about newsletter from now on.
In the admin-panel I can choose to send all users a newsletter that want this. Additionally there is an option that allows me to ignore the user-setting and send the newsletter to everybody.
But although some users have disabled newsletters and although I have not enabled to ignore the user-setting when writing the newsletter, all e-mail-addresses of all users are added to the "to"-field.
So my question is: What am I doing wrong? Users' e-mail-addresses are supposed to show up only when
a) I have specified to ignore the user-setting (which I didn't do)
b) the user has not disabled newsletters.
Before starting this topic I searched this sub-board for "news letter", "newsletter" and "notify user not".
This is a bug in 1.1.3
You can fix it by opening ManageNews.php (Sources)
And Find:
if (!empty($condition_array))
$condition = '
AND ' . implode('
AND ', $condition_array);
Replace:
if (!empty($condition_array))
$condition .= '
AND ' . implode('
AND ', $condition_array);
It is a 1 character change but it causes this problem. You will need to reverse this change to upgrade to 1.1.4 when it is released.
Thank you very much.
I attached the fix as a mod-file so people don't need to manually edit files.
If there are any problems with the mod-file, tell me.