Unsubscribe assistance

iksqi

New Member
Uhm.. you may have a bug in the MLM... It turns out that the unsubscribed users are for some reason being added to the "All" unsubscribed list instead of to the specific one I was using. In any case, when MaxBulk checks with MLM for a list of unsubscribed users, it only checks the specific list, it doesn't check the "All" list. This is, I believe, incorrect, as if a users unsubscribes to All lists, MaxBulk should be aware of that and remove the users from the local lists.

To fix this, I modified the code for the function GetLocalUnsubscribeList in lm_functions.php as follow, adding the code that appends results for the "All" lists so that those unusbscirbed users are considered as well:


$singlelist = explode( ";", $lists );
foreach ( $singlelist as $mylist ) {
$filename = $path_to_offlists . "/" . $mylist . $ext_list;
$lockfile = $path_to_offlists . "/" . $mylist . $ext_list_lock;
$locker = @fopen( $lockfile, "a+" );

If ( $locker && file_exists( $filename ) ) {
If ( flock( $locker, LOCK_EX ) ) {
//$result .= LoadFileContentsAsText( $filename );
$fcontents = LoadFileContentsAsArray( $filename );
if ( count($fcontents) > 0 ) {
while ( list ($line_num, $line) = each ($fcontents) ) { // while there are elements in the array
$line = str_replace("\n", "", $line);
$field = explode( "\t", $line );
if ( $field[5] == 0 ) {
//if ($result <> "" ) { $result .= "\n"; }
$result .= $line . "\n";
}
}
}
EmptyFile( $filename );
flock( $locker, LOCK_UN );
} else {
$mlm_err = "Error opening $lockfile";
$result = False;
}
@fclose( $locker );
} else {
$mlm_err = "Error opening $filename";
$result = False;
}
}
$singlelist = explode( ";", "All" );
foreach ( $singlelist as $mylist ) {
$filename = $path_to_offlists . "/" . $mylist . $ext_list;
$lockfile = $path_to_offlists . "/" . $mylist . $ext_list_lock;
$locker = @fopen( $lockfile, "a+" );

If ( $locker && file_exists( $filename ) ) {
If ( flock( $locker, LOCK_EX ) ) {
//$result .= LoadFileContentsAsText( $filename );
$fcontents = LoadFileContentsAsArray( $filename );
if ( count($fcontents) > 0 ) {
while ( list ($line_num, $line) = each ($fcontents) ) { // while there are elements in the array
$line = str_replace("\n", "", $line);
$field = explode( "\t", $line );
if ( $field[5] == 0 ) {
//if ($result <> "" ) { $result .= "\n"; }
$result .= $line . "\n";
}
}
}
EmptyFile( $filename );
flock( $locker, LOCK_UN );
} else {
$mlm_err = "Error opening $lockfile";
$result = False;
}
@fclose( $locker );
} else {
$mlm_err = "Error opening $filename";
$result = False;
}
}

 

iksqi

New Member
I thought I did since all the thousands of users I wanted to email showed up in the list of recipients, but now that I went back to check, I see that the same list of recipients appears by default even if the pull down menu for the lists is blank. So it's possible that I did not actually use the pull down to re-select the correct user list since the users were already visible by default.

I guess this is another issue... I mean if I see the list of users I assume I'm already using the correct list, but apparently this may not be the case.
 

iksqi

New Member
I can't be 100% sure, but yes, it could be possible. I had tested thoroughly for an hour before sending the real thing, and had closed-reopened the document multiple times during the process to make sure the unsubscribe process worked and to ensure that when reopening the application MaxBulk would see my test accounts be unsubscribed... It's possible I sent out the actual mailing after having re-opened the document.

Please note that while it is an issue to send out a mailing without MaxBulk knowing what mailing list was used, but it's a different issue (and just as bad) to have users unsubscribe from "All" and MaxBulk not seeing it. I'm not sure if my PHP mod above fixes that in the correct way, but so far it's working out for us.
 

stanbusk

Administrator
Staff member
A subscriber will unsubscribe from all lists if no list name and no list parameter is provided in the unsubscribe URL.
 

iksqi

New Member
stanbusk said:
A subscriber will unsubscribe from all lists if no list name and no list parameter is provided in the unsubscribe URL.

Yes they will, but MaxBulk will not see that unless the MLM PHP script is modified as I did per above.
 

stanbusk

Administrator
Staff member
This is the command explained (from the doc):

lm.php?cmd=unsubscribe[&list=list1[;list2;...]]&email=email_addr[&pwd=password]

This command when used without the administrator password lets a visitor unsubscribe himself from one or several lists. When used with the administrator password the command forces the direct unsubscription of an address from one or several lists bypassing the double opt-in mechanism. If no list is submitted the email address will be unsubscribed from all lists. A command is made of parameters, 'cmd' is the command name and it is required. 'list' is the list name(s), 'email' is the email address involved in the command and 'pwd' is the administrator password. Optional parameters (or parts) are enclosed into brackets. Remove the brackets to include a parameter or remove the parameter and its brackets if you don't want to use it.
 

iksqi

New Member
I'm not sure this applies... users are unsubscribing by clicking on the "unsubscribe" link that was automatically added to the email by MaxBulk thanks to the "unsubscribe" tab (which makes things super-easy... nicely implemented!). However, probably due to the fact that there was no list actually selected from the drop-down when the mailing went out, that link in the email is causing them to unsubscribe from the "All" list. As I mentioned, MaxBulk does not see any users who are added to that "all" unsubscribe list, and thus these users remain active in my list. The only way to "Fix" this and to have MaxBulk see the users who unsubscribed to "All" was to modify the PHP function so that in addition to the specific list being selected, the XML also contains users who unsubscribed to "All" - which I believe should have occurred to begin with.
 

stanbusk

Administrator
Staff member
As I told you there is no such 'All' list. If you set list to 'All' you will create a list called 'All'.

MaxBulk Mailer is set to remember what list was selected when reopening a document for click-through tracking only if the list was saved at least once using the list pull-down menu. Did you do it?
 

iksqi

New Member
I'm not sure what to tell you about the "All" list, except for the fact to please take a look at the screenshot I attached. Those 3 files - All.lock, All.out and All.txt are what I found in the MLM folder structure after hours of panicking trying to figure out how to get the list of subscribers for which I was seeing email unsubscribe confirmations coming in. I did not create those files, and the All.out contains the list of users who are unsubscribing using the link that was automatically inserted in the emails by MaxBulk. That unsubscribe URL, for one of my test recipients, was:
http://www.logsat.com/MLM/lm/lm.php?un= ... &local=yes

For saving the list - yes, I had saved it. Also please note that click tracking, opening tracking and unsubscribe count are *all* working just fine - in MLM I can see stats for all of these for the list, under "Deliveries". This entry under Deliveries is labelled as:

89 [Info] Family Tracker now supports Android phones

And again, its stats work just fine, except for the fact that these unsubscribers do not end up in one of those 8583-?.out files, but rather in the "All.out" file.
 

stanbusk

Administrator
Staff member
About your screenshot, the 'All' files you see correspond to a list named 'All'. Note that I wrote MLM from the very first line and there is no such 'All' list as you describe. Sorry to insist but I never wrote code to handle that. If a list or lists names are provided, they are used. If no list is provided, the unsubscribe is global and immediate. You can look at the code.
 

iksqi

New Member
I do not know what to tell you either :)
Please see this other screenshot. The 3 "All.???" files were created on Dec 25th at 3:15PM. The folder "localreq" was automatically created by MLM on Dec 25th at 3:15PM. So I'm assuming MLM created those files during the initial configuration process. Please note that I did not use the built-in deploy of the MLM to my webserver as the FTP copy operation was failing, so I copied the "lm" folder manually from the MaxBulk Mailer\Goodies\Mailing List manager package.

Also note that only after installing MLM I started configuring MaxBulk to use the MLM features. I sent out the actual mailing at 6:30PM on Dec 25th, many hours *after* the "All" files were created. And the unsubscribers for that mailing started to appear in the All.out file after 6:30, 3 hours after that file was created.

So it's likely MLM actually is the one that created those files, even though there could be a possibility their creation was triggered by MaxBulk. But I'm not the programmer, so I can only tell you what I see. If you want to look into this more, and there's anything I can provide you / give you access to just let me know, I'll be glad to help.
 

stanbusk

Administrator
Staff member
No, MLM doesn't create those 'All' files. As I told you there is no such thing as a 'All' list. Look at the code, do you see a place where MLM creates a 'All' file? No, MLM only creates the lists whose name are provided with the 'list' parameter. Believe me, I wrote MLM completely, from first to last line, there is no such 'All' thing, actually why should MLM should create such list? MLM doesn't creates any list on its own, only the one you provide the name of. This is not something I believe it is that way, it is something that *IS* that way. The code is open and readable to confirm that. "All' is used as a parameter for click-tracking and some mySQL commands, never as the name of a list.
 
Top