Lets start off with I am using Version 2.7 I realized when I sent out a Christmas message and set the options to 'All Members', I assumed it would not include 'inactive' / 'canceled' members. I was wrong. Amazingly, out of the thousands of emails that went to canceled members, I only got 3 responses. Two were nice, and one I just laughed at because I enjoyed upsetting him (again).
Modifying the code to exclude inactive members, after hours of looking, was very easy.
Get your /includes/cp/cp.newsletters.php
Find:
elseif ( $to_group )
{
$sqlwhere[] = "m.group_id=$to_group";
if ( $ptype )
{
$sqlwhere[] = "m.type_id=$ptype";
}
}
Just below that, add:
if ($to_group == "0" && !$to_username) { // not send newsletter marked for 'ALL' to in-active members
$sqlwhere[] = "m.active=1";
}
I discovered after my first tests that my first code would not send a message at all to inactive members. Then after checking the program again, I added the !$to_username. Now it works perfect. I tested it on 'All members' when I had 1 inactive, and sent a private one just to the inactive member. All good!
I hope this helps someone, and Merry Christmas!