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 Import (Moderator: Yashodha Chaku) »
  • Importing On-Hold Email Status
Pages: [1]

Author Topic: Importing On-Hold Email Status  (Read 1269 times)

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Importing On-Hold Email Status
March 05, 2009, 02:54:42 pm
We are running CiviCRM 1.9 and have quite a few issues with bounce processing. I've written a crude routine to identify the bounces and would like to do a batch update of the email "on-hold" status.  However, this field does not seem to be available in the import process for either 1.9 or version 2.2

Any insights on this?

I guess we'll create our own "should be on hold" custom field and get to work on correcting the emails, parsing the work out to different regional chapters. 

Any insights or suggestions?

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: Importing On-Hold Email Status
March 05, 2009, 04:15:53 pm

might be significantly easier to write a php / mysql script to set the on_hold flag from your bounce list

// assuming you have all the bounced emails
foreach ( $emails as $email ) {
  $query = "UPDATE civicrm_email SET on_hold = 1 WHERE email = %1";
  $params = array( 1 => array( $email, 'String' );
  CRM_Core_DAO::executeQuery( $query, $params );
}

probably not the most efficient, but gets the job done :)

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

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Re: Importing On-Hold Email Status
March 05, 2009, 09:43:10 pm
Thanks for the info, I was a little afraid that there may be more involved that just setting the flag.  We should be able to do your suggestion.

Dave

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Importing On-Hold Email Status

This forum was archived on 2017-11-26.