Results 1 to 9 of 9

Thread: Customized opt-out message

  1. #1
    maggie.d is offline Sugar Community Member
    Join Date
    Mar 2007
    Location
    London
    Posts
    21

    Wink Customized opt-out message

    Hi - can anyone help me?

    I've just started exploring Sugar and am trying to familiarize myself with all of it before starting an email campaign for a client next week (scarey!)

    I've sent a few test campaigns and everything seems to be working fine so far (what a brilliant package it is).

    But what I wondered is:

    Is it possible to change the message shown to the recipient who elects to opt-out? At the moment, displayed in the top, left corner of the browser, it simply says:

    *You have elected to opt out and to no longer receive emails.
    (not very friendly, huh?)

    Is there a way to customize it?
    or get it to display another webpage which has already been customized to say goodbye or some such?
    Even a way to change the wording to something more friendly would be helpful.

    Many thanks
    Maggie

    SugarCRM Version 4.5.1b (Build 1246)
    Site hosted at unitedhosting.co.uk
    PHP - 4.4.2
    MySQL - 4.1.20

  2. #2
    henryjiva is offline Sugar Community Member
    Join Date
    Apr 2007
    Posts
    15

    Default Re: Customized opt-out message

    Edit your removeme.php file.

    I am not sure if you can display some other web-site thru it (i mean i hadnt tested it), but as far as the text is concerned, you can edit it and add n number of graphics to it.

    Hope it helped you.

    - Henry

  3. #3
    duncan12 is offline Member
    Join Date
    Jan 2007
    Posts
    9

    Default Re: Customized opt-out message

    I am on the hosted sugar pro, so I don't think I can edit the php file. what we need is the ability to redirect the user to the page of our choice after they hit the Sugar opt-out page. That way we don't need to make some custom opt-out process, but we can still have 100% control over the post opt-out experience.

  4. #4
    whallify is offline Member
    Join Date
    Jan 2009
    Posts
    15

    Default Re: Customized opt-out message

    I know this is pretty old but it's been knocking me upside the head for a looooong time now, and I never found a good answer.

    I'm running SugarCRM 5.2 CE. I didn't want people to just get a bare white HTML page saying "You have elected to opt out of receiving emails." To me, this is incredibly unprofessional and, um, lame.

    At first, I thought I'd create a Tracker-URL that points to my customized opt-out message, and then click "opt-out" so that SugarCRM knew it was an opt-out link. But every. single. time. I do this, it erases my custom URL and replaces it with "index.php?entryPoint=removeme".

    There was once, when I had just created the tracker URLs from the wizard, where I was able to see a list of the Tracker URLs and have a separate "opt-out" checkbox in the list, but I cannot find it now. And now I'm stuck.

    Or am I?

    Here's how I hacked it. I went and looked for the function that does the removeme part. It used to be /removeme.php but now it's an embedded function, which is in (crmdir)/modules/Campaigns/RemoveMe.php.

    Look for the part with LBL_ELECTED_TO_OPTOUT and add the two lines I show right after that line:

    //Print Confirmation Message.
    echo $mod_strings['LBL_ELECTED_TO_OPTOUT'];

    header('HTTP/1.1 301 Moved Permanently');
    header('Location: PUT_URL_HERE');

    Change PUT_URL_HERE to be your url, like http://mydomain.com/opt-out.html or whatever.

    By making this change, when someone clicks the opt-out link, they still get removed, it still gets tracked, and you get your own resultant page.

    This really would be a good thing to NOT have to do.

  5. #5
    sugarilove is offline Junior Member
    Join Date
    Sep 2008
    Posts
    3

    Default Re: Customized opt-out message

    Hello,
    I try with an older version (removeme.php is under the first directory) and its says that :

    *You have elected to opt out of receiving emails.
    Warning: Cannot modify header information - headers already sent by (output started at /homez.31/XXXX/www/XXXXX/removeme.php:86) in /homez.31/XXX/www/XXXX/removeme.php on line 92

    Warning: Cannot modify header information - headers already sent by (output started at /homez.31/XXXX/www/XXXX/removeme.php:86) in /homez.31/XXX/www/XXXX/removeme.php on line 93


    XXXX replaces real name of data base and real addres.

    Do you have an idea ?
    TY for your help
    ----
    code below

    require_once('include/entryPoint.php');
    require_once('modules/Campaigns/utils.php');

    if (!empty($_REQUEST['remove'])) clean_string($_REQUEST['remove'], "STANDARD");
    if (!empty($_REQUEST['from'])) clean_string($_REQUEST['from'], "STANDARD");

    if(!empty($_REQUEST['identifier'])) {
    $keys=log_campaign_activity($_REQUEST['identifier'],'removed');
    global $current_language;
    $mod_strings = return_module_language($current_language, 'Campaigns');

    if (!empty($keys) && $keys['target_type'] == 'Users'){
    //Users cannot opt out of receiving emails, print out warning message.
    echo $mod_strings['LBL_USERS_CANNOT_OPTOUT'];
    }elseif(!empty($keys) && isset($keys['campaign_id']) && !empty($keys['campaign_id'])){
    //we need to unsubscribe the user from this particular campaign
    require_once('include/modules.php');
    $beantype = $beanList[$keys['target_type']];
    require_once($beanFiles[$beantype]);
    $focus = new $beantype();




    $focus->retrieve($keys['target_id']);



    unsubscribe($keys['campaign_id'], $focus);

    }elseif(!empty($keys)){
    $id = $keys['target_id'];
    $module = trim($keys['target_type']);
    $class = $beanList[$module];
    require_once($beanFiles[$class]);
    $mod = new $class();
    $db = & PearDatabase::getInstance();

    $id = $db->quote($id);

    //no opt out for users.
    if(ereg('^[0-9A-Za-z\-]*$', $id) && $module != 'Users'){
    //record this activity in the campaing log table..
    $query = "UPDATE email_addresses SET opt_out= 1 WHERE id in (select email_address_id from email_addr_bean_rel where bean_id = '$id' and email_addr_bean_rel.deleted=0) ";
    $status=$db->query($query);
    if($status){
    echo "*";
    }
    }
    }
    //Print Confirmation Message.
    echo $mod_strings['LBL_ELECTED_TO_OPTOUT'];
    header('HTTP/1.1 301 Moved Permanently');
    header('Location: http://www.XXXX.com');

    }
    sugar_cleanup();
    ?>
    Last edited by sugarilove; 2009-02-10 at 09:48 AM. Reason: details

  6. #6
    robertbmirth is offline Sugar Community Member
    Join Date
    Jun 2010
    Location
    Irvine, CA
    Posts
    345

    Default Re: Customized opt-out message

    /bump

    So I've been looking at this problem on and off for a little bit as well, and I have an answer, but its not the prettiest. Basically what I'm doing is I'm manually adding a prefix to to the opt out link which is my own website, and then passing the removeme link as a GET parameter. On my website I'm using cURL to call the removeme link, along with the identifier parameter.

    The problem with this method is that it requires manual addition of the url every time we want to send a newsletter email. In the event that we forget... well, we break the law, so it'd be nice to have it automatic. Does anyone know how to make a modification to any outbound newsletter email? I've tried logic hooks, but they don't seem to do the trick.

    Props if you know how to do it on a hosted system, because otherwise I can't use the solution.

  7. #7
    robertbmirth is offline Sugar Community Member
    Join Date
    Jun 2010
    Location
    Irvine, CA
    Posts
    345

    Default Re: Customized opt-out message

    So the solution to my problem, for anyone interested, is that you need to write a logic hook on the EmailTemplate, not the Email. Its straightforward from there (Except, maybe, figuring out which templates your hook should automatically add the opt out link to)

  8. #8
    Ubunter35's Avatar
    Ubunter35 is offline Sugar Community Member
    Join Date
    Jun 2010
    Location
    Madrid- Espaņa
    Posts
    19

    Exclamation Re: Customized opt-out message

    Hi,
    Thanks for this thread, it's interesting, but let's go a little bit farer...

    In my case, I have several languages teams working into several languages in the CRM. So, if I want to customize the opout message, it should be starting from different languages pages... I mean, I redirect to my own page http://www.mypage.com/opout_en.html
    So here I add a page in english... but how can I customize to drive to different pages in deferent languages which I create?
    Where I create xxx/opout_es.html, ...etc.

    Any idea?

    Regards,
    Softbrocker
    Used Software Licensing Business at softbrocker.com

    SipCel Telecom
    Voip for Business, Enterprise, Callcenters, and Wholesale Transit at sipcel.com

  9. #9
    tdwiadmin is offline Member
    Join Date
    Sep 2010
    Posts
    7

    Default Re: Customized opt-out message

    whallify solution on 2009-09-02 is briliiant and works.

    Agree with last line in post that this should not be the permanent solution.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. 4.2: Outbound email - message body missing
    By nkendrick in forum Help
    Replies: 13
    Last Post: 2008-06-19, 02:07 PM
  2. Replies: 1
    Last Post: 2007-04-23, 03:56 PM
  3. Text message capability for events.
    By chucknb87122 in forum Feature Requests
    Replies: 1
    Last Post: 2007-02-14, 02:29 PM
  4. Replies: 4
    Last Post: 2006-03-31, 04:33 PM
  5. Replies: 0
    Last Post: 2006-03-10, 07:03 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •