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) »
  • How to generate an unsubscribe link without using Civi API
Pages: [1]

Author Topic: How to generate an unsubscribe link without using Civi API  (Read 817 times)

Keith

  • I post occasionally
  • **
  • Posts: 42
  • Karma: 0
How to generate an unsubscribe link without using Civi API
October 16, 2013, 08:30:08 am
I am creating an automated email system outside of Civi.

I am accessing Civi's database to pull the contact information but don't want any further integration into Civi.

Because I am pulling the contact email out of civi, I would like to be able to put an unsubscribe link in the footer of my email.

MY QUESTION:
How can I generate the unsubscribe link?


I notice that the ones generated by civi have a hash tag, a job number, etc.

Is this reasonable for me to try to do?

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: How to generate an unsubscribe link without using Civi API
October 16, 2013, 08:42:38 am
Hi,

you don't want to store as activities in civi the mailings done from your system?

the unsubscribe link is indeed linked to the mailing, but the opt out isn't I think, so you could just generate the checksum?

I don't think there is an api to generate a checksum yet, but would be simple to add it. Can you give it a go?
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

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: How to generate an unsubscribe link without using Civi API
October 16, 2013, 08:45:44 am

am curious of your use case and what you are doing outside civi, if you are willing to share.

to use unsubscribe, u'll need to create a mailing / job and all the other tables associated with a mailing. Might be a lot more work than needed for your case

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

Keith

  • I post occasionally
  • **
  • Posts: 42
  • Karma: 0
Re: How to generate an unsubscribe link without using Civi API
October 16, 2013, 09:04:59 am
I am creating an automated weekly email that pulls data from another system on our server formats it into an email and mails it out using a simple php script. The key is that it is automated by a cron job and does not need any human attention. I have to be able to use PHP because I need to be able to pull data from the other system (which changes daily).

I do not want to create another contacts database since we are using civi for that. Right now we are manually individuals to a group for this mailing.

I had hoped I could create a link for the bottom of these automated email that could allow the user to simply click and be unsubscribed from the civi group.

I guess it might be easier to include "Reply with Unsubscribe in Subject" and manually unsubscribe them from the group.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: How to generate an unsubscribe link without using Civi API
October 16, 2013, 09:16:11 am
Hi,

You can create a mailing automatically now (there is an api for that). so you can keep the automated cronjob that gets the content and make it ready but instead of sending the emails you just saves that as a civi mailing and let civimail do the sending/unsubscribe/bounce...

Would it solve your problem?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Keith

  • I post occasionally
  • **
  • Posts: 42
  • Karma: 0
Re: How to generate an unsubscribe link without using Civi API
October 16, 2013, 09:21:20 am
What would the API be?

Would the optout allow the user to optout of just this group (mailing list) or from all further bulk mail from civi?

I would need to learn how to use it.
« Last Edit: October 16, 2013, 09:24:43 am by Keith »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • How to generate an unsubscribe link without using Civi API

This forum was archived on 2017-11-26.