Vtiger PHPListSync patch to respect unsubscribes

Solutions for other advanced phplisters

Vtiger PHPListSync patch to respect unsubscribes

Postby bdeferme » 11:45am, Fri 23 Sep, 2011

We at Open-Future are using PHPList to send out mass mailings, we really like this software.

However, we are using Vtiger as a source for our contacts.

To synchronise Vtiger contacts and leads to PHPList we use PHPListSync. We were having problems however with users unsubscribing from our mailings still receiving mailings afterwards. We traced this problem back to PHPListsync.

Every time you synchronise, it doesn't just add new users but also RE-subscribes unsubscribed users. We created a small patch for PHPListSync to revert this behaviour and would like to share it here for people using the same kind of setup.

!Warning! This patch has some side-effects. If you apply it, and you do a resynchronisation from Vtiger to PHPList, people who were already synchronised but their membership has changed will not be updated! However, we just use PHPListSync to synchronise new users to the lists, and do list management directly in PHPList.

Appearantly .patch or .txt are extensions that are not allowed so please find the patch at the bottom of this post.

Code: Select all
~# cd /path/to/PHPListSync
PHPListSync# patch -p1 < /path/to/respect-optout.patch

Some Links:

Vtiger: http://www.vtiger.com
PHPListSync: http://forge.vtiger.com/projects/phplistsync/
The patch homepage: http://projects.open-future.be/projects/phplistsync-respect-opt-out
The patch download url: http://projects.open-future.be/attachments/download/2/respect-optout.patch

Moderator edit - above respect-optout.patch is small enough to be included as code:
Code: Select all
diff -Naur PHPListSync/sync.php PHPListSync_patched/sync.php
--- PHPListSync/sync.php   2011-04-13 09:56:58.000000000 +0200
+++ PHPListSync_patched/sync.php   2011-09-23 12:12:16.000000000 +0200
@@ -56,7 +56,8 @@
             } else { #If the query returned anything, a user is in system, but not the right list.. let us fix that
-                AddExistingUser($strippedstring,$listid);
+                # AddExistingUser($strippedstring,$listid);
 //                logToFile("Email $strippedstring is in the newsletter system, but not the right list ($listid). I am correcting this now.");
phpList newbie
Posts: 1
Joined: 11:20am, Fri 23 Sep, 2011

Return to Advanced Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 3 guests