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) »
  • Embedding OptOutUrl in a link?
Pages: [1]

Author Topic: Embedding OptOutUrl in a link?  (Read 784 times)

penguintrax

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 2
  • CiviCRM version: 3.3x and 4.x depending on site
  • CMS version: Joomla 1.5 or 1.7 depending on site
  • MySQL version: 5.0.92-community
  • PHP version: 5.2.17
Embedding OptOutUrl in a link?
May 24, 2010, 10:35:34 am
One of our clients does not like the long URL in the footer of his outgoing CiviMail messages. Is there a way to either shorten the URL or embed it in a link?

A secondary issue is that, even when sent to an HTML only recipient, neither the OptOutUrl or the OptOut mail address appear as a link. In fact, the OptOut e-mail address appears as code (mailto:  etc.)

Thanks in advance for any assistance.

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: Embedding OptOutUrl in a link?
May 24, 2010, 12:51:35 pm

you should embed the url or the mailto address in a link in your message. The token just returns the url or the email address

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

penguintrax

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 2
  • CiviCRM version: 3.3x and 4.x depending on site
  • CMS version: Joomla 1.5 or 1.7 depending on site
  • MySQL version: 5.0.92-community
  • PHP version: 5.2.17
Re: Embedding OptOutUrl in a link?
May 24, 2010, 06:57:31 pm
If I try to send a message w/o the token in the message, it won't let me proceed. Am I missing something blindingly obvious? Each of those OptOutUrl tokens is custom to the user to whom the message was sent.

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Embedding OptOutUrl in a link?
May 26, 2010, 02:11:18 am
The idea is that your final HTML template contains something like
Code: [Select]
<a href="{action.optOutUrl}">click here to opt-out</a>
– let us know if this does not work.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

penguintrax

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 2
  • CiviCRM version: 3.3x and 4.x depending on site
  • CMS version: Joomla 1.5 or 1.7 depending on site
  • MySQL version: 5.0.92-community
  • PHP version: 5.2.17
Re: Embedding OptOutUrl in a link?
May 26, 2010, 06:35:30 am
Thank you for the explicit instructions - makes much more sense now. I wasn't aware that you could embed a token in an HREF statement like that.  Very handy trick!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Embedding OptOutUrl in a link?

This forum was archived on 2017-11-26.