Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-1802

Tokens not Working in Message Templates for HTML Version and Subject

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: None
    • Fix Version/s: 1.7
    • Component/s: CiviMember
    • Labels:
      None

      Description

      Sending out membership renewal reminder using a message template. Screenshot is attached.

      The "good news" is that if the receiving contact's mail format preference is Both or HTML, they get the HTML version of the message (this is correct). The "bad news" is that the tokens are not parsed in the HTML version, only in the TEXT version.

      Also - I had thought that we were supporting tokens in the Subject line. However, this is isn't working for either format. If this is a big deal, we can remove the "help text" on the Message Template form which says you can use tokens in the subject (not sure how much folks will use this feature).

      Here's the actual message sent for a "Both" contact (multi-part):
      -------
      Subject: Membership Renewal Reminder for

      {contact.first_name}
      To: "Mr Sheila N Adams Jr" <dggreenberg+sheila@gmail.com>
      Content-Type: multipart/alternative;
      boundary="=_91e0c224c704ff36b9b76db7470e6d18"
      Date: Fri, 06 Apr 2007 17:59:09 -0700

      --=_91e0c224c704ff36b9b76db7470e6d18
      Content-Type: text/plain; charset="utf-8"
      Content-Transfer-Encoding: 8bit

      Dear Sheila,
      It's time to renew your General Membership for Save the Whales.
      --=_91e0c224c704ff36b9b76db7470e6d18
      Content-Type: text/html; charset="utf-8"
      Content-Transfer-Encoding: 8bit

      Dear {contact.first_name}

      ,<br />
      <strong>It's time to renew your General Membership for Save the Whales.</strong>
      <p>HTML version</p>.

        Attachments

          Activity

            People

            • Assignee:
              kiran.jagtap Kiran Jagtap
              Reporter:
              dgg David Greenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: