Unsubscribe from all mailing lists?

Use this forum for questions regarding adoption and functionality of OpenEMM

Moderator: moderator

obs
Posts: 8
Joined: Sat Aug 25, 2007 12:27 am

Unsubscribe from all mailing lists?

Post by obs »

How can this be accomplished - can a wildcard be used for agnMAILINGLIST?
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

Wildcard does not work, but you could try to use a mechanism what we call "negative subscription". Therefore, you have to send all relevant mailing IDs and a value of 0 (=unsubscribe) for the corresponding agnSUBSCRIBE tag.

Let's say you want to unsubscribe from 3 mailing lists with IDs 1, 12 and 23:

Code: Select all

<form action="form.do" method="post">
<input type="hidden" name="agnCI" value="1">
<input type="hidden" name="agnFN" value="unsubscribe_all">
<input type="hidden" name="gender" value="2">
<input type="hidden" name="mailtype" value="1">
<input type="hidden" name="agnMAILINGLIST" value="1">
<input type="hidden" name="agnSUBSCRIBE" value="0">
<input type="hidden" name="agnMAILINGLIST_1" value="12">
<input type="hidden" name="agnSUBSCRIBE_1" value="0">
<input type="hidden" name="agnMAILINGLIST_2" value="23">
<input type="hidden" name="agnSUBSCRIBE_2" value="0">
email address to unsubscribe:
<input type="text" name="EMAIL">
<input type="submit" name=" Unsubscribe ">
</form>
This works for our commercial product EMM and should also work with OpenEMM.
OpenEMM Maintainer
alex_S
Posts: 1
Joined: Mon Mar 17, 2008 12:16 pm

Unsubscribe from multiple mailling list ?

Post by alex_S »

Hello,
I installed OpenEMM 5.4 on CentOS 4.6 last week and the system runs well except for the UNSUBSCRIBE stuff.
I need to manage many Mailing lists and the user should have the option to unsubscribe to one of those lists.
Now, the UNSUBSCRIBE works, but only for mailing list with ID 1 ...

I checked the article in http://www.openemm.org/forums/ftopic619.html, tried to do the same, but still no success ...
I added the following the the unsubscribe form:
...
<input type="hidden" name="agnMAILINGLIST_1" value="1">
<input type="hidden" name="agnSUBSCRIBE_1" value="0">
<input type="hidden" name="agnMAILINGLIST_2" value="2">
<input type="hidden" name="agnSUBSCRIBE_2" value="0">
<input type="hidden" name="agnMAILINGLIST_3" value="3">
<input type="hidden" name="agnSUBSCRIBE_3" value="0">
...
Can someone give me a hint ?[/code]
Hofmann M.
Posts: 22
Joined: Thu Aug 03, 2006 3:18 pm
Location: Ruhpolding, BY, Germany
Contact:

Post by Hofmann M. »

Hello all,

i heard about your problems to unsubscribe from 2 or more mailinglists.

So i have tried it with some script-actions (available since Version 5.4).
You have to create the following steps:

1. Create an action (I named it "unsubscribe_multi"):
Step 1. Load recipient-data
Step 2. Script-Action with following content:

Code: Select all

##unsubscribe script for more mailinglists

##set Company ID
#set($company = 1)

##Check the availability of the customer
#if($customerID != 0)
  $BindingEntry.setCustomerID($customerID)

  ##define first mailinglist
  $BindingEntry.setMailinglistID(1)

  #if($BindingEntry.getUserBindingFromDB($company) == true)
     #if($BindingEntry.getUserStatus() == 1)
       $BindingEntry.setUserStatus(3)
       $BindingEntry.setUserRemark("Opt-Out by Script")
       $BindingEntry.updateBindingInDB($company)
       #set($result="checked out from list A")
     #else
       #set($result="not active on list A")
     #end
  #else
     #set($result="without binding to list A")
  #end

  ##define second mailinglist
  $BindingEntry.setMailinglistID(2)

  #if($BindingEntry.getUserBindingFromDB($company) == true)
     #if($BindingEntry.getUserStatus() == 1)
       $BindingEntry.setUserStatus(3)
       $BindingEntry.setUserRemark("Opt-Out by Script")
       $BindingEntry.updateBindingInDB($company)
       #set($result1="checked out from list B")
     #else
       #set($result1="not active on list B")
     #end
  #else
     #set($result1="without binding to list B")
  #end

#else
  #set($result="not a customer of our mailings")
  #set($result1="not a customer of our mailings")
#end

##necessary for a successful result
#set($scriptResult="1")
2. Create a form (I named it "unsubscribe_more"):
Action: unsubscribe_multi
Success-Form:

Code: Select all

<b>Success Form</b>
<p>You are $result<br>
and you are $result1</p>
Error-Form:

Code: Select all

Error
[/code]

3. Insert link in your mail:
Replace your unsubscribe link.

Code: Select all

http://your.domain.com:8081/form.do?agnCI=1&agnFN=unsubscribe_more&agnUID=##AGNUID##
That's all!

For explanation all cases of "UserStatus":
  • 1= active
    2= bounced
    3= opt out by admin
    4= opt out by user
    5= waiting for confirm (double opt in)
    6= blacklisted by ...
    7= suspend

Greetings.
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

To activate the script actions feature in OpenEMM insert permission 'action.op.ExecuteScript' into table admin_group_permission_Tbl with

mysql –u root -p openemm
use openemm
INSERT INTO admin_group_permission_tbl (admin_group_id, security_token) values (4, 'action.op.ExecuteScript');
commit;
quit
OpenEMM Maintainer
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

documentation

Post by maschoff »

The documentation of the script action feature is now available:

http://www.openemm.org/fileadmin/docs/S ... tation.pdf

Have fun!
OpenEMM Maintainer
sr-ska
Posts: 22
Joined: Tue Mar 19, 2013 6:56 pm

Re: Unsubscribe from all mailing lists?

Post by sr-ska »

Not really working, I want the user to choose which mailing lists he wants to unsubscribe.
Can you help me please?
Thx
Post Reply