Closed (fixed)
Project:
Mailout
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Nov 2008 at 16:32 UTC
Updated:
12 Feb 2009 at 06:40 UTC
The global opt out feature does not appear to be working. Recipients that have global opt out "selected" are not removed during a Mailout send. They still receive email.
After reviewing the code, it was not clear to me where the feature would have been included.
To get it working I patched the mailout_sendmail function.
Please advise if this functionality exists somewhere else, or review patch for inclusion.
++ // Global Opt-Out is not being observed. Could not find record of this in issues.
++ $opted_out_addresses = db_query("SELECT email FROM {mailout_list_addresses} WHERE list_id = %d", MAILOUT_GLOBAL_OPTOUT);
$message_count = 0;
foreach ($address_list AS $key => $data) {
++ // Global Opt-Out is not being observed. Adding catch here.
++ $not_opted_out = 1;
++ for($i = 0; $i < db_num_rows($opted_out_addresses); $i++){
++ $this_opted_out_address = mysql_result($opted_out_addresses,$i,"email");
++ if ($data['email'] == $this_opted_out_address){
++ $not_opted_out = 0;
++ break; }
++ }
++ if ($not_opted_out){
// Insert db record for each insert
db_query("INSERT INTO {mailout_message_log} (mlid, email_to, name, html) VALUES (%d, '%s', '%s', %d)", $mlid, $data['email'], $data['name'], $data['html']);
$message_count++;
++ }
}
Comments
Comment #1
8manj-dupe commentedI cannot deploy this patch, terminal is reporting "patch unexpectedly ends in middle of line, patch: **** Only garbage was found in the patch input.
The opt-out is definitely not working and we're using rc2. This module is unfortunately not that operational, we are having more problems than success with this!! Can you please forward the amended version of the mailout_send.inc file you have working so we can try that
Comment #2
simeDoh, that's crappy. Fixed in RC3 coming up.
Comment #3
simehttp://drupal.org/cvs?commit=167726