Skip to end of metadata
Go to start of metadata


CiviCRM Documentation


Developer Resources


CiviCRM books!

Make sure to check out our Online User/Administrator Guide!

Or support us by buying an eBook or hard copy of Using CiviCRM and The CiviCRM Cookbook from Packt Publishing.

CiviMail uses a number of action and mail-merge tokens and which can be placed in mailing labels, PDF letters, email messages and message templates, mailing headers and footers, and system-workflow (automated) messages. These tokens are converted dynamically to text, reply-to email addresses, and URLs.

The best source of documentation for tokens is: http://book.civicrm.org/user/common-workflows/tokens-and-mail-merge

This wiki page gives supplemental information for working with tokens. You can also customize or create new tokens relatively painlessly.

 

Required Tokens

The following tokens MUST be included in all CiviMail mailings - either in the mailing body, the header or the footer:

  • {action.optOutUrl} OR {action.optOut} - Recipient opt-out from all bulk email communications. (The clickable opt-out link (optOutUrl) is recommended.)

OR

  • {action.unsubscribeUrl} OR {action.unsubscribe - Recipient unsubscribes from the mailing list groups used for this mailing. (The clickable unsubscribe link (unsubscribeUrl) is recommended.)

AND

  • {domain.address} - Displays the postal address for sending organization.

This table documents the available action tokens, their purpose and the place(s) they can be used.

Token

Purpose

Where used...

Example

{action.unsubscribeUrl}

Provides an unsubscribe link for each recipient.

Mailing Body, Header, Footer,unsubscribe,resubscribe

To unsubscribe from this mailing, click <a href="{action.unsubscribeUrl}" >here</a>.

{action.unsubscribe}

Provides an unsubscribe email address for each recipient

Mailing Body, Header, Footer,unsubscribe,resubscribe

To unsubscribe from this mailing, send mail to {action.unsubscribe}

{action.resubscribeUrl}

Provides a re-subscribe link for each recipient

Mailing Body, Header, Footer,unsubscribe,resubscribe

To resubscribe to this mailing, click <a href="{action.resubscribeUrl}" >here</a>.

{action.resubscribe}

Provides a re-subscribe email address for each recipient.

Mailing Body, Header, Footer,unsubscribe,resubscribe

To resubscribe to this mailing, send mail to {action.resubscribe}

{action.optOutUrl}

Provides an opt-out link for each recipient.

Mailing Body, Header, Footer,unsubscribe,resubscribe

To opt-out of all future mailings from us, click <a href="{action.optOut}" >here</a>.

{action.optOut}

Provides an opt-out email address for each recipient.

Mailing Body, Header, Footer,unsubscribe,resubscribe

To opt-out of all mailings from us, send mail to {action.optOut}

{action.forward}

Provides a link for each recipient to forward the mailing to others.

Mailing Body, Header, Footer

To forward this mailing to friends or colleagues, click <a href="{action.forward}" >here</a>.

{action.reply}

 Provides a reply-to email address for each recipient

Mailing Body, Header, Footer,unsubscribe,resubscribe

To reply to this mailing, send mail to {action.reply}

{action.subscribeUrl}

Provides a link to view and subscribe to any public mailing lists.

Mailing Body, Header, Footer

To see our mailing lists and join the ones you're interested in, click <a href="{action.subscribeUrl}" >here</a>.

{action.subscribeUrl.gid}

Provides a link to subscribe to a specific group (gid = CiviCRM ID of that group).

  Mailing Body, Header, Footer

 To subscribe to our Monthly Newsletter, click <a href="{action.subscribeUrl.2}" >here</a>.

{action.subscribe.gid}

Provides an email address to subscribe to a specific group.

Mailing Body, Header, Footer

To subscribe to our Monthly Newsletter, send mail to {action.subscribe}.

{welcome.group}

Displays the newly joined group name in a welcome messages.

Welcome message

Welcome to {welcome.group}.

{subscribe.group}

Displays group name in subscription confirmation requests.

Subscription confirmation request 

You requested to be subscribed to the {subscribe.group}.

{unsubscribe.group}

Displays group name in unsubscribe confirmation messages.

Unsubscribe Message

You have been unsubscribed from {unsubscribe.group}.

{resubscribe.group}

Displays group name in re-subscribe messages.

Resubscribe Message

As requested, you have been resubscribed to {resubscribe.group}.

{domain.name}

Displays your domain name.

Mailing Body or any message templates

This mailing is from {domain.name}.

{domain.address}

Displays postal address for your domain.

Mailing Body or any message templates

Mailing Address:  {domain.address}

{domain.phone}

Displays phone number of domain.

Mailing Body or any message templates

To contact us call {domain.phone}.

{domain.email}

Displays email address of domain.

Mailing Body or any message templates

Or send a mail to {domain.email}.

{mailing.name}

Displays name of mailing.

Mailing Body, Header, Footer,resubscribe,unsubscribe or optout

Name of this mailing is {mailing.name}.

{mailing.group}

Displays a listing of the names of the groups to which a mailing has been sent.

Mailing Body, Header, Footer,resubscribe,unsubscribe or optout

This mailing has been sent to the members of {mailing.group}.

{mailing.viewUrl}Will create a 'View in Browser' urlMailing Body

Can't see this email? <a href="{mailing.viewUrl}"><strong>View in Browser</strong></a>

Checksum tokens

There is a very powerful feature to allow you to send an email with CiviMail to your constituents with a link to the contribution form, profile, or event registration form with all of their contact information already filled in! This saves them the hassle of filling it out and increasing the chances they would ultimately donate.  Or it can be a simple way to periodically allow people to review their contact info and update it if applicable.

The way it works is you create a "special" link in the CiviMail message that includes the checksum token {contact.checksum}. When people click on the special link, it looks them up in the database and prefills any information on the contribution form or profile with any data that exists in their record. The special link lasts for seven days from the time it was sent out.

Checksum for Contribution Pages: To send people to a contribution page use this path where N is the ID of your contribution page:

Checksum for standard Profiles (edit mode): To send people to a profile use this path where N is the ID of the Profile you want to send them to:

Checksum for Event Registration Pages: To send people to an event registration page use this path where N is the ID of your event:

Checksum for Petition Signature Pages: To send people to sign a petition, use this path where N is the ID of your petition:

Labels