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) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Batch process emails and set them on hold - Drupal
Pages: [1]

Author Topic: Batch process emails and set them on hold - Drupal  (Read 919 times)

knob

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 4.2.0
  • CMS version: Drupal
  • MySQL version: 5.1.65-cll
  • PHP version: 5.3.16
Batch process emails and set them on hold - Drupal
June 25, 2013, 12:32:12 am
Hey there,
I found myself in need of having a list of email addresses that are already in the CiviCRM that I needed to set them on hold. Expecting this to reoccur quite often, I wrote a small Drupal module to process these emails and set them on hold.

I do not have experience though with the CiviCRM API and I am not sure I am using the best, most efficient approach. I wrote a blog post explaining the procedure and the code, and you have the module set up in a git repo on drupal.org.

Please let me know what you think.

http://www.webomelette.com/civicrm-batch-email-on-hold-drupal  <- blog post explaining in more detail + code for review
https://drupal.org/sandbox/Knob/2023157<- git repo with all the module code

Thanks a lot.

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: Batch process emails and set them on hold - Drupal
June 25, 2013, 05:17:01 am
Seems like it could be useful if you have partner organizations providing the opt-outs/black-lists.

You might want to post it on the website at:

http://civicrm.org/extensions

(Note: You'll need to be registered & logged-in before adding to the extension directory.)

knob

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 4.2.0
  • CMS version: Drupal
  • MySQL version: 5.1.65-cll
  • PHP version: 5.3.16
Re: Batch process emails and set them on hold - Drupal
June 25, 2013, 05:21:30 am
That's indeed a possible use case. For me it was that with Mandrill SMPT, the bounced emails refused to get sent to the inbox I set up for bounce processing.

I am not so familiar with the CiviCRM community. Is this extensions thing something where you drop your sandbox modules? Or what is the purpose of that?

Thanks for your help!

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: Batch process emails and set them on hold - Drupal
June 25, 2013, 05:57:22 am
The word "extension" can mean a couple things:

 * In the civicrm.org website, we have the "Extension directory" for publishing links to any Drupal modules, Drupal themes, Joomla plugins, etc. that help make CiviCRM more useful. When people ask about where to find customizations, we point them to the website. When someone thinks about writing a new customization, we suggest searching the directory first to see if it's already been done.

 * In the CiviCRM application, we have a framework for developing & distributing "CMS-independent" extensions -- these customize CiviCRM, and they work on D6, D7, Joomla, or WordPress. Compared to a Drupal-CiviCRM module (like the one you posted), this allows a developer to share a customization with more people -- but it does require using a different (and less mature) framework. There's a tutorial at:

http://wiki.civicrm.org/confluence/display/CRMDOC43/Create+an+Extension
http://wiki.civicrm.org/confluence/display/CRMDOC43/Create+a+Module+Extension

This is a little different from sandbox.drupal.org because we don't provide any hosting for the code -- we just store some metadata. You can publish the code via any means -- Github.com, Sourceforge.net, Drupal.org, your own website, etc.

knob

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 4.2.0
  • CMS version: Drupal
  • MySQL version: 5.1.65-cll
  • PHP version: 5.3.16
Re: Batch process emails and set them on hold - Drupal
June 25, 2013, 07:50:42 am
I understand. Will check it out!

Thanks a lot!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Batch process emails and set them on hold - Drupal

This forum was archived on 2017-11-26.