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) »
  • Meaning of components in the optout URL
Pages: [1]

Author Topic: Meaning of components in the optout URL  (Read 643 times)

Dennis Gray

  • Ask me questions
  • ****
  • Posts: 472
  • Karma: 1
  • CiviCRM version: Various. See post.
  • CMS version: Drupal, Wordpress and Joomla. See post.
  • MySQL version: TBA
  • PHP version: TBA
Meaning of components in the optout URL
September 29, 2012, 04:50:21 am
CiviCRM 1.9  ;D

For various reasons, we want to send a mailing to our membership without using CiviMail. Most likely this will be done with a PHP script which will read a table extracted from CiviCRM. We want to be able to allow members to optout, though. I have looked at the format of the optout URL from a CiviMail mailing and it looks like this:

https://www.example.com/civicrm/mailing/optout?reset=1&jid=27502&qid=17584666&h=9f3631060b938e41

I am not sure what the various parameters mean but what I want to do is allow users to optout from a non-CiviMail mailing. I suppose there is an API that can do this so someone point me in the right direction?

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Meaning of components in the optout URL
September 29, 2012, 10:46:21 am
have a look at civicrm_mailing_event_queue and associated tables.

jid=job id, qid= queue id and h = hash (the security token that stops random unsubcribes)

i don't think there is an api that allows you to create and use unsubscribe links. i guess you might be able to re-use some of the mailing logic but i would not like to do that.

there is the GroupContact api in later versions but that has no 'security hash logic'. not sure what the 1.9 equivalent is. i guess you could make your own hashes somehow and have some logic that checks against it...
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Meaning of components in the optout URL

This forum was archived on 2017-11-26.