nodesman / wp-autoresponder

Email marketing and newsletter plugin for WordPress
40 stars 22 forks source link

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

Open speedy200man opened 10 years ago

speedy200man commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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 notifications@github.com To: nodesman/javelin javelin@noreply.github.com Cc: speedy200man speedy200man@yahoo.com 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 commented 10 years ago

It's actually not discontinued.

speedy200man commented 10 years ago

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


From: Gordon notifications@github.com To: nodesman/javelin javelin@noreply.github.com Cc: speedy200man speedy200man@yahoo.com 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.