CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions (Moderator: Dave Greenberg) »
  • Civimail Default setting for Remove Duplicate Emails?
Pages: [1]

Author Topic: Civimail Default setting for Remove Duplicate Emails?  (Read 1058 times)

freedomlives

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: Drupal 7
Civimail Default setting for Remove Duplicate Emails?
February 09, 2014, 06:11:27 am
It would be a nice feature to allow in the configuration for this check box to default as set.  We have been clicking each time before sending mails but sometimes forget to click which is a source of annoyance to some of our contacts where several family members are using the same email address.

By the way, I appreciate the addition of the setting allowing for opt-out checks to be removed.  I am outside the U.S. and this is not necessary for all mailings, and inconvenient in certain cases-- e.g. we want to send an email to all Members of Parliament as an organization and we don't want a staffer to remove them from receiving the mailings from us.  Of course, for our newsletters and other periodic mailings to the general public we have opt-out options.

johns

  • I’m new here
  • *
  • Posts: 20
  • Karma: 1
    • Free Software Foundation
  • CiviCRM version: 4.3
  • CMS version: Drupal
Re: Civimail Default setting for Remove Duplicate Emails?
February 09, 2014, 07:53:26 am
Our staff has also asked many times for the "remove duplicates" to be an option that can be set once as opposed to for every mailing.

I do wonder -- what is the use case for *not* removing duplicates?
Support free software by supporting the Free Software Foundation: http://u.fsf.org/buildusup

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Civimail Default setting for Remove Duplicate Emails?
February 09, 2014, 12:03:05 pm
I read this, agreed, wrote a patch - was halfway through submitting an issue with it, when I realized there was a use case I hadn't considered.  If you have two users with the same e-mail address, and you dedupe - does it still create activities for both users?  I'll need to test, and I'm not sure I have time to dig too deeply here.

That said, if you're PHP-savvy and would like the patch, it's a simple one-liner (diff is below).   Note that if this does NOT get merged into core, then it'd probably be better to make a jQuery one-liner in <civicrm custom folder>/CRM/Mailing/Form/Group.extra.tpl to handle this, so you don't have to reapply changes on upgrade.

diff --git a/CRM/Mailing/Form/Group.php b/CRM/Mailing/Form/Group.php
index 788ee89..9594043 100644
--- a/CRM/Mailing/Form/Group.php
+++ b/CRM/Mailing/Form/Group.php
@@ -100,6 +100,7 @@ class CRM_Mailing_Form_Group extends CRM_Contact_Form_Task {
     $continue = CRM_Utils_Request::retrieve('continue', 'String', $this, FALSE, NULL);
 
     $defaults = array();
+    $defaults['dedupe_email'] = true;
     if ($this->_mailingID) {
       // check that the user has permission to access mailing id
       CRM_Mailing_BAO_Mailing::checkPermission($this->_mailingID);

Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Civimail Default setting for Remove Duplicate Emails?
February 09, 2014, 12:47:32 pm
OK - I decided to do this the "right" way.  Instead of changing a default, I created a new setting in Administer menu -> CiviMail -> CiviMail Component Settings.  I just submitted a pull request against Civi 4.5.

If you'd like to hack this into your current version, you can check the changes here: https://github.com/PalanteJon/civicrm-core/compare/master...dedupe-email-opt

Personally, I'd wait until the change was accepted, but it DOES work!  Hope this makes both your days a bit better.

Jon
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

freedomlives

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: Drupal 7
Re: Civimail Default setting for Remove Duplicate Emails?
February 18, 2014, 08:38:06 am
Great!  Thanks!  When that upgrade comes out, I'll put it in and then won't need to remind my wife about that checkbox anymore.

Its hard to say, but I think that double-mailing probably also can contribute to being temporarily blacklisted from gmail, which happened to us but then seems to have gone away after a couple of days.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions (Moderator: Dave Greenberg) »
  • Civimail Default setting for Remove Duplicate Emails?

This forum was archived on 2017-11-26.