Answers.Body: <p>This is how I do. You have 2 tokens: </p>
  
  <blockquote>
    <p>{action.unsubscribeUrl} </p>
  </blockquote>
  
  <p>to unsubscribe</p>
  
  <p>and </p>
  
  <blockquote>
    <p>{action.optOutUrl}</p>
  </blockquote>
  
  <p>to opt-out</p>
  
  <p>I placed this code in a block at the end of the e-mail and it does the job.</p>
  
  <pre><code>&lt;p style="text-align: center;"&gt;Si vous ne souhaitez plus recevoir de message de notre part, cliquez &lt;a title="d&amp;eacute;sabonnement" href="{action.unsubscribeUrl}" target="_blank"&gt;ici pour vous d&amp;eacute;sabonner&lt;/a&gt; et &lt;a href="{action.optOutUrl}" target="_blank"&gt;ici pour vous d&amp;eacute;sinscrire de toutes les campagnes du DOMAIN&lt;/a&gt;&lt;/p&gt;
  </code></pre>
  
  <p>and these are the links I get in the e-mail:</p>
  
  <pre><code>https://domain.net/civicrm/mailing/unsubscribe?reset=1&amp;jid=4&amp;qid=6&amp;h=06932199472f700e
  
  https://domain.net/civicrm/mailing/optout?reset=1&amp;jid=4&amp;qid=6&amp;h=06932199472f700e
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-03T16:55:26.830Z
Answers.LastActivityDate: 2020-03-03T16:55:26.830Z
Answers.UserDisplayName: Guillaume Sorel
Answers.Body: <p>To change the default unsubscribe link in Mosaico to an opt-out requires editing the extension code. I did the following tweak and it worked fine. <strong>Please note</strong> that this is not an ideal solution, and that the change will disappear when you update the Mosaico extension. For a temporary hack it works. This is with Mosaico extension version 2.7.1621893607. Details may vary for other versions. Make sure you backup the original file first and test the change.</p>
  <p>Edit file:
  ~/wordpress/wp-content/uploads/civicrm/extensions/uk.co.vedaconsulting.mosaico/mosaico.php</p>
  <p>Change line 339 as follows, from</p>
  <blockquote>
  <p>'[unsubscribe_link]' =&gt; '{action.unsubscribeUrl}',</p>
  </blockquote>
  <p>To</p>
  <blockquote>
  <p>'[unsubscribe_link]' =&gt; '{action.optOutUrl}',</p>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-24T13:29:27.050Z
Answers.LastActivityDate: 2021-10-24T13:29:27.050Z
Answers.UserDisplayName: twowheeler
Body: <p>The default Mosaico template has unsubscribe option in header.   However the token or destination url is for group unsubscribe rather than the more general opt-out token.     I cannot see a way to insert/change the token that is used for the default or to change for an individual template.</p>
  
  <p>Default:
  <a href="https://i.sstatic.net/Cwx8J.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Cwx8J.jpg" alt="enter image description here"></a></p>
  
  <p>Preferred:</p>
  
  <p><a href="https://i.sstatic.net/SgptD.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/SgptD.png" alt="enter image description here"></a></p>
  
  <p>(1) Is there a way to change an individual mailing to opt-out for unsubscribe (the more common requirement than removing from a Group)</p>
  
  <p>(2) Is there a way to change the default?</p>
  
  <p>Thanks</p>
  
Tags: <civimail><mosaico><opt-out>
Title: Mosaico default template - unsubscribe setting
ThreadText: # Mosaico default template - unsubscribe setting
  
  (Asked by: username_0 on 2019-08-01)
  
  The default Mosaico template has unsubscribe option in header. However the token or destination url is for group unsubscribe rather than the more general opt-out token. I cannot see a way to insert/change the token that is used for the default or to change for an individual template.
  
  Default:
  [![enter image description here](https://i.sstatic.net/Cwx8J.jpg)](https://i.sstatic.net/Cwx8J.jpg)
  
  Preferred:
  
  [![enter image description here](https://i.sstatic.net/SgptD.png)](https://i.sstatic.net/SgptD.png)
  
  (1) Is there a way to change an individual mailing to opt-out for unsubscribe (the more common requirement than removing from a Group)
  
  (2) Is there a way to change the default?
  
  Thanks
  
  **Tags:** civimail, mosaico, opt-out
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2020-03-03. Score: 2
  
  This is how I do. You have 2 tokens:
  
  > {action.unsubscribeUrl}
  
  to unsubscribe
  
  and
  
  > {action.optOutUrl}
  
  to opt-out
  
  I placed this code in a block at the end of the e-mail and it does the job.
  
  ```
  <p style="text-align: center;">Si vous ne souhaitez plus recevoir de message de notre part, cliquez <a title="d&eacute;sabonnement" href="{action.unsubscribeUrl}" target="_blank">ici pour vous d&eacute;sabonner</a> et <a href="{action.optOutUrl}" target="_blank">ici pour vous d&eacute;sinscrire de toutes les campagnes du DOMAIN</a></p>
  
  ```
  
  and these are the links I get in the e-mail:
  
  ```
  https://domain.net/civicrm/mailing/unsubscribe?reset=1&jid=4&qid=6&h=06932199472f700e
  
  https://domain.net/civicrm/mailing/optout?reset=1&jid=4&qid=6&h=06932199472f700e
  
  ```
  
  
  ---
  
  ### Answer by username_2 on 2021-10-24. Score: 1
  
  To change the default unsubscribe link in Mosaico to an opt-out requires editing the extension code. I did the following tweak and it worked fine. **Please note** that this is not an ideal solution, and that the change will disappear when you update the Mosaico extension. For a temporary hack it works. This is with Mosaico extension version 2.7.1621893607. Details may vary for other versions. Make sure you backup the original file first and test the change.
  
  Edit file:
  ~/wordpress/wp-content/uploads/civicrm/extensions/uk.co.vedaconsulting.mosaico/mosaico.php
  
  Change line 339 as follows, from
  
  > '[unsubscribe\_link]' => '{action.unsubscribeUrl}',
  
  To
  
  > '[unsubscribe\_link]' => '{action.optOutUrl}',
  
  
  ---
  
  