0

I would need to override the value of the token {action.resubscribe} in the automated mailing message template when the contact is sent the unsubscribe confirmation email, as it doesn't contain the right email address.

How could I change this value?

Any help with that would be very much appreciated.

4
  • Do you mean the token is giving you an incorrect address, or that it is giving the address we expect civi to offer but that you need it to use something else. If the former, can you explain a bit more with some examples
    – petednz - fuzion
    Commented Feb 8, 2023 at 18:20
  • Yes, it is given an incorrect email address, in particular the domain name. We moved our site to another domain name and Civi is retrieving the old domain name, not the new one. How does Civi get the domain name for this token? Commented Feb 10, 2023 at 9:51
  • Not sure. sorry but it sounds like either in your 'move' some old info was left in your system (eg in civicrm.settings.php but if that was the case then i would expect more problems) or that this is cached and your caches have not cleared (or there is an obscure setting which has been overlooked. the best solution for a dev (if you have access to or are one) would be to grep your code and search a dump of your db for your old domain. sorry i can't spell out how to do that in detail but am sure that if you add that as part of your original Question then someone will
    – petednz - fuzion
    Commented Feb 10, 2023 at 19:42
  • I do think that 'fixing' this problem is better than 'overriding' it
    – petednz - fuzion
    Commented Feb 10, 2023 at 19:43

1 Answer 1

1

The token {action.resubscribe} is taken from the field "domain" in the table civicrm_mail_settings. It contained the old domain.

By changing this value to the new domain we managed to fix the problem so that the unsubscribe confirmation email contains the right email address if the contact wants to re-subscribe.

Your Answer

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

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