1

We communicate with the families we serve via SMS, email has proven much less effective. Is there a way to send via SMS a link to a fully formatted, personalized message? Akin to a "view in browser" button from CiviMail, but where the content of the SMS is short/simple and the link opens a richer message.

CiviCRM 5.64.4, Drupal 7.97

1 Answer 1

2

If you have a CiviMail and you get the view link for it and add a contact id and checksum tokens as you would normally (so you'll end up with something like /civicrm/mailing/view?reset=1&id=NNN&cid={contact.id}&{contact.checksum}), then you'll have a personalized message in the browser (this is the same URL as you would get for the "View in browser" link).

So just create an email mailing, send it to yourself, then send the link to view the mailing via SMS.

But that is a rather long URL, unfortunately.

7
  • contact.hash isn't the right thing because that's just the hash - you need the checksum which includes a timestamp and lifetime /civicrm/mailing/view?reset=1&id=NNN&cid={contact.id}&{contact.checksum}. (note no cs=). But yes your solution is a good idea!
    – Demerit
    Sep 15 at 2:05
  • Thanks, fixed the answer. Though I think the cs= is optional, isn't it? Definitely works with it (and clearer too).
    – Lars SG
    Sep 15 at 4:16
  • Sorry but I need a bit more handholding. By adding the following link URL to the message it produces Lars' suggestion - {mailing.viewUrl}&cid={contact.id}&{contact.checksum} Clicking the resulting link on a logged in browser window displays the message. Likewise in a private/incognito window if Publication is set to Public Pages. Unfortunately the private window test results in Access denied if Publication is set to User and User Admin Only. Any thoughts on how to make that last use case work? I'm very reluctant to make these messages public, and the recipients don't have CiviCRM accounts.
    – wil_SRQ
    Sep 16 at 12:22
  • You're right, it doesn't allow access, but I think it should. Here's an issue: lab.civicrm.org/dev/core/-/issues/4608
    – Lars SG
    Sep 16 at 14:44
  • In the meantime, you could try changing the permission to view public mailings so that anonymous users cannot access them, then you can safely make the mailings public, but without making them actually public.
    – Lars SG
    Sep 16 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.