Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broadcast sends email to all all subscribers of other newsletters #282

Open
speedy200man opened this issue Sep 3, 2013 · 5 comments
Open

Comments

@speedy200man
Copy link

Hello!
Thank you so much for this amazing plugin.
My tests show that when a send a broadcast to 1 newsletter subscribers, all subscribers of all lists get the email. Can you please fix this ?

Thank you !

@speedy200man
Copy link
Author

Hi guys!
I made a fix for this issue.

Step 1:
In the source code of newmail.php please replace the line 24 with
$recipients = (!empty($_POST['recipients']))?$_POST['recipients']:$nid;

The default behavior is to populate the column in the database with the value from this field. However, the javascript library / function is doing nothing, hence the first issue related to the code.

Step 2:

In the source of processes/broadcast_processor.php, the query used to filter the recipients is not correct. so, on line 34 you should replace the old query with the new one

$getSubscribersForBroadcastQuery = sprintf(
"SELECT subscribers.*
FROM {$wpdb->prefix}wpr_subscribers as subscribers
LEFT JOIN {$wpdb->prefix}wpr_newsletters as newsletters on (newsletters.id=subscribers.fid)
WHERE 1
AND subscribers.active=1
AND subscribers.confirmed=1
AND subscribers.fid='".$nid."' "
);

This will take in account only the subscribers that enrolled to the specified newsletter in the broadcast record.

Hope this helps and thank you again for this plugin!
Cezar

@lukeheights
Copy link

Cezar,
How do I get the latest version of the plugin?
Do I need to make all the code changes you have been posting individually?
Thanks

@speedy200man
Copy link
Author

Hey!

I see that the work on this plugin has been discontinued.
Making the changes posted by me will make the plugin work correctly.

Have fun !
Cezar


From: lukeheights [email protected]
To: nodesman/javelin [email protected]
Cc: speedy200man [email protected]
Sent: Thursday, January 2, 2014 11:38 PM
Subject: Re: [javelin] Broadcast sends email to all all subscribers of other newsletters (#282)

Cezar,
How do I get the latest version of the plugin?
Do I need to make all the code changes you have been posting individually?
Thanks

Reply to this email directly or view it on GitHub.

@GordonFreeman
Copy link
Collaborator

It's actually not discontinued.

@speedy200man
Copy link
Author

It was written on the plugin page, sorry if I misunderstood...


From: Gordon [email protected]
To: nodesman/javelin [email protected]
Cc: speedy200man [email protected]
Sent: Friday, January 3, 2014 11:27 AM
Subject: Re: [javelin] Broadcast sends email to all all subscribers of other newsletters (#282)

It's actually not discontinued.

Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants