Answers.Body: <p>The token <strong>{action.resubscribe}</strong> is taken from the field &quot;<em><strong>domain</strong></em>&quot; in the table <em><strong>civicrm_mail_settings</strong></em>. It contained the old domain.</p>
  <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-28T10:10:25.703Z
Answers.LastActivityDate: 2023-06-28T10:10:25.703Z
Answers.UserDisplayName: Cristina P.
Body: <p>I would need to <strong>override</strong> the value of the token <strong>{action.resubscribe}</strong> in the automated mailing message template when the contact is sent the <strong>unsubscribe confirmation email</strong>, as it doesn't contain the right email address.</p>
  <p>How could I change this value?</p>
  <p>Any help with that would be very much appreciated.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-02-08T18:20:23.300Z
Comments.Text: 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
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-02-10T09:51:00.077Z
Comments.Text: 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?
Comments.UserDisplayName: Cristina P.
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-02-10T19:42:44.763Z
Comments.Text: 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
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-02-10T19:43:06.270Z
Comments.Text: I do think that 'fixing' this problem is better than 'overriding' it
Comments.UserDisplayName: petednz - fuzion
Tags: <civimail><tokens><mailing><unsubscribe>
Title: How to override token {action.resubscribe} for Mailings
ThreadText: # How to override token {action.resubscribe} for Mailings
  
  (Asked by: username_0 on 2023-02-08)
  
  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.
  
  **Tags:** civimail, tokens, mailing, unsubscribe
  
  > **Comments:**
  > **username_1**: 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  
  > **username_0**: 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?  
  > **username_1**: 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  
  > **username_1**: I do think that 'fixing' this problem is better than 'overriding' it  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2023-06-28. Score: 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.
  
  
  ---
  
  