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 CiviMail (Moderator: Piotr Szotkowski) »
  • CiviMail Unsubscibe Hook?
Pages: [1]

Author Topic: CiviMail Unsubscibe Hook?  (Read 1003 times)

mwmconsulting

  • Guest
CiviMail Unsubscibe Hook?
September 01, 2009, 03:05:40 pm
Hey All,

Just wondering if there is a CiviCRM hook available to intercept mail group unsubscribe requests.  We would like to implement some custom code when a user unsubscribes from a group.

I've looked at the list of CiviCRM hooks (http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+hook+specification) but none of them seem to be what we need.   ???

Any help or guidance you can provide would be greatly appreciated.

Thx!

- MWM

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 Unsubscibe Hook?
September 01, 2009, 08:50:55 pm

currently no.

but a patch to add a hook to all CiviMail related "events" would be great and gratefully accepted :)

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

mwmconsulting

  • Guest
Re: CiviMail Unsubscibe Hook?
September 02, 2009, 07:47:23 am
How would one go about writing a patch to implement hooks?  Are there some tutorials on how to implement hooks in a module?

Thx Lobo.

- MWM

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 Unsubscibe Hook?
September 02, 2009, 02:05:48 pm

your best bet would be to check code that does something similar

CRM/Contact/Page/AJAX.php

in the 3.0 version has a simple example (search for Hook). also check the file CRM/Utils/Hook.php

if you can document the process on the wiki that would be great :)

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • CiviMail Unsubscibe Hook?

This forum was archived on 2017-11-26.