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 »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Best way to mass-update email domains?
Pages: [1]

Author Topic: Best way to mass-update email domains?  (Read 446 times)

daveatkins

  • I post occasionally
  • **
  • Posts: 68
  • Karma: 2
  • CiviCRM version: 4.1.6
  • CMS version: Drupal 6.28
  • MySQL version: 5.1.41
  • PHP version: 5.2.10
Best way to mass-update email domains?
January 03, 2013, 08:23:44 am
Several times now, we have had situations where an organization changes its domain name. I need to change all the email addresses to fit the new domain name; e.g. "dave@example.com" is now "dave@example.gov"

also, many of these users have linked Drupal accounts. probably the same kind of update needed there.

sounds like a direct database update query or two but I HATE the risk factor of messing around like that. If that is the only or best way, can someone post an example of exact syntax?

jclemo

  • I’m new here
  • *
  • Posts: 15
  • Karma: 1
  • CiviCRM version: 4.1
  • CMS version: Drupal 7
  • MySQL version: 5.0.95
  • PHP version: 5.3.10
Re: Best way to mass-update email domains?
January 03, 2013, 02:34:46 pm
Hi Dave
Can't give you the syntax but a different approach that may work and avoids messing with the database directly...

1) perform an advanced search for the email domain %@olddomain.com
2) export these results
3) Modify domains
4) import the edited csv using the duplicate checking feature and update record option

Not sure how this would work for the drupal user side but just an approach to think about hope it helps

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Best way to mass-update email domains?

This forum was archived on 2017-11-26.