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) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Civimail send to non-primary location email
Pages: [1]

Author Topic: Civimail send to non-primary location email  (Read 1973 times)

ruid

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 4
Civimail send to non-primary location email
December 09, 2008, 04:15:43 pm
I have a contact who has preferred email in her primary location and also an other preferred email in other location.

The Civimail was sending emails to her non-primary location email instead of the primary location preferred email. There is no bulk mailing checked for any emails of this contact. I checked the database records and found email1 which is in primary location has "is_primary=1" and the location record has "is_primary=1", the other email (call it email2) has  "is_primary=1" and the location record has "is_primary=0". I believe it is the right setting for this contact. However, only email2 can receive the emails.

Is there any chance the Civimail will send email to non-primary location email? How can I solve it?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Civimail send to non-primary location email
December 09, 2008, 05:14:42 pm

can u set the is_primary of email1 to be 0 and see if that fixes the problem? (yes i know, this is a short term hack)

basically in 2.0 we did away with the concept of "primary location". i suspect if 2 emails are primary, one is picked at random (maybe the one with lower id?)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Civimail send to non-primary location email
December 11, 2008, 12:01:35 pm
Quote from: Donald Lobo on December 09, 2008, 05:14:42 pm
basically in 2.0 we did away with the concept of "primary location". i suspect if 2 emails are primary, one is picked at random (maybe the one with lower id?)

I don't understand what you mean. I have a CiviCRM 2.1.1 site with what is perhaps the opposite problem. We have a group of 109 members and when I try to email them, it says 84 are missing an email address. It is true that they have no email listed in their primary location, but many do have one in the non-primary location. But it seems that CiviCRM is not interested in using that email. Is this correct?

With regard to no concept of "primary location", can you explain what you mean by that? On my 2.1.1 site if I select "primary location" for an address on a contact where a different address already is primary, then I get a JS popup asking if I want to do that, and if I agree, then it removes the "primary location" check from the original address and leaves it only on the new one. I think I am missing something here. :)

Thanks.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Civimail send to non-primary location email
December 11, 2008, 12:39:38 pm

Is the email marked as primary in the other locations? I just checked the query and the email where clause is:

$email.is_bulkmail = 1 OR $email.is_primary = 1

The primary location in the edit screen is now associated with the address record. We will restructure the edit screen in a future release. There is no "location" object in v2.0 and later

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Civimail send to non-primary location email
December 11, 2008, 12:45:25 pm
Quote from: Donald Lobo on December 11, 2008, 12:39:38 pm
Is the email marked as primary in the other locations? I just checked the query and the email where clause is:
$email.is_bulkmail = 1 OR $email.is_primary = 1

By "primary" you mean is it "is_bulkmail=1"? No, it can't be set to that, as far as I can see. See this post I just made: http://forum.civicrm.org/index.php/topic,3903.msg25973.html#msg25973

Thanks.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Civimail send to non-primary location email

This forum was archived on 2017-11-26.