Answers.Body: <p>I expect the token only gets populated with the relevent URL when it is used as part of a CiviMailing.</p>
  
  <p>The automated message you are referring to does not go out via CiviMail, so it is possible that it will not function in that feature.</p>
  
  <p>Since it seems that the checksum doesn't work directly with civicrm/mailing/subscribe?reset=1 you can set up a Profile that includes your public mailing lists, and send them to that. Bit of a pain having to do the extra steps. </p>
  
  <p>Using tokens for Profiles is detailed here: <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/Tokens" rel="nofollow noreferrer">https://wiki.civicrm.org/confluence/display/CRMDOC/Tokens</a></p>
  
  <p>And using Profiles for Mailing Lists is here: <a href="https://docs.civicrm.org/user/en/4.7/email/set-up/#allow-people-to-sign-up-for-your-mailing-lists-online" rel="nofollow noreferrer">https://docs.civicrm.org/user/en/4.7/email/set-up/#allow-people-to-sign-up-for-your-mailing-lists-online</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-21T17:01:30.547Z
Answers.Text: If that's the case, how do you comply with the requirement that every email an org send needs to include this opt-out link?  This is not some custom message we're trying to shoehorn into the system - it's the built-in email generated when a website visitor signs up for a mailing list.  What do other organizations do?
Answers.UserDisplayName: Ruth D
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-21T19:51:15.333Z
Answers.Text: Not sure which requirements you are referring to but my understanding has been that this generally refers to bulk mailing lists. If someone signs up to such a list - then they may get a welcome - but the Opt Out is required on the bulk mailing.
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-21T19:54:25.680Z
Answers.Text: I have added a para to my answer explaining how your 'welcome' email could link to civicrm/mailing/subscribe
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-21T20:46:53.450Z
Answers.Text: Thanks petednz, can you elaborate on how to "providing a link with a checksum **to civicrm/mailing/subscribe**"?
Answers.UserDisplayName: Ruth D
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-23T22:55:43.363Z
Answers.Text: Added in Answer
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-24T00:28:35.617Z
Answers.Text: Thanks pete, I had read those pages so many times I practically have them memorized!  If by civicrm/mailing/subscribe you just meant send them to an unsubscribe page, I understand that.  I'll document my conclusion in the Answer below.
Answers.UserDisplayName: Ruth D
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-24T02:19:46.177Z
Answers.Text: once it turned out checksum wouldn't work on civicrm/mailing/subscribe?reset=1 i realised you would have to do this by sending them a link with checksum to a Profile instead. hope that was clear enough
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-21T06:00:30.460Z
Answers.LastActivityDate: 2017-05-23T22:57:55.963Z
Answers.LastEditDate: 2017-05-23T22:57:55.963Z
Answers.UserDisplayName: petednz - fuzion
Answers.Body: <p>I believe the final answer is that you cannot insert an action token into an automated message.  Looking further into the CAN-Spam Act, which says you don't need to include unsubscribe links in transactional email, I guess strictly speaking we don't need to include this unsubscribe link in the "Welcome" email.  Would still be a welcome feature.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-24T20:09:52.217Z
Answers.LastActivityDate: 2017-05-24T20:09:52.217Z
Answers.UserDisplayName: Ruth D
Body: <p>I've been trying to add unsubscribe and optout functionality to the default "Welcome Message" email template you find under Administer, Header, Footers, and Automated Messages. I don't have HTML experience but using the code in the "Mailing Footer" sample, the documentation, and a wysiwyg editor, I added this in the Body - HTML Format text block of the "Welcome Message":</p>
  
  <pre><code>&lt;p&gt;&lt;span style="font-size:14px;"&gt;&lt;span style="font- family:arial,helvetica,sans-serif;"&gt;To unsubscribe from this newsletter, &lt;a href="{action.unsubscribeUrl}"&gt;click here&lt;/a&gt;.  &lt;br /&gt; To opt out of all future emails from us, &lt;a href="{action.optOutUrl}"&gt;click here&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
  </code></pre>
  
  <p>When I test this and produce the Welcome email, these tokens don't appear as links, only text.  I've been researching this all day with no luck.  Please help!</p>
  
  <p>I'm on Wordpress 4.7.5 and CiviCRM 4.7.16.</p>
  
Tags: <tokens><message-templates>
Title: Can't get action token {action.unsubscribeUrl} to work in Welcome automated message
ThreadText: # Can't get action token {action.unsubscribeUrl} to work in Welcome automated message
  
  (Asked by: username_0 on 2017-05-21)
  
  I've been trying to add unsubscribe and optout functionality to the default "Welcome Message" email template you find under Administer, Header, Footers, and Automated Messages. I don't have HTML experience but using the code in the "Mailing Footer" sample, the documentation, and a wysiwyg editor, I added this in the Body - HTML Format text block of the "Welcome Message":
  
  ```
  <p><span style="font-size:14px;"><span style="font- family:arial,helvetica,sans-serif;">To unsubscribe from this newsletter, <a href="{action.unsubscribeUrl}">click here</a>.  <br /> To opt out of all future emails from us, <a href="{action.optOutUrl}">click here</a>.</span></span></p>
  
  ```
  
  When I test this and produce the Welcome email, these tokens don't appear as links, only text. I've been researching this all day with no luck. Please help!
  
  I'm on Wordpress 4.7.5 and CiviCRM 4.7.16.
  
  **Tags:** tokens, message-templates
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2017-05-21. Score: 2
  
  I expect the token only gets populated with the relevent URL when it is used as part of a CiviMailing.
  
  The automated message you are referring to does not go out via CiviMail, so it is possible that it will not function in that feature.
  
  Since it seems that the checksum doesn't work directly with civicrm/mailing/subscribe?reset=1 you can set up a Profile that includes your public mailing lists, and send them to that. Bit of a pain having to do the extra steps.
  
  Using tokens for Profiles is detailed here: <https://wiki.civicrm.org/confluence/display/CRMDOC/Tokens>
  
  And using Profiles for Mailing Lists is here: <https://docs.civicrm.org/user/en/4.7/email/set-up/#allow-people-to-sign-up-for-your-mailing-lists-online>
  
  > **Comments:**
  > **username_0**: If that's the case, how do you comply with the requirement that every email an org send needs to include this opt-out link?  This is not some custom message we're trying to shoehorn into the system - it's the built-in email generated when a website visitor signs up for a mailing list.  What do other organizations do?  
  > **username_1**: Not sure which requirements you are referring to but my understanding has been that this generally refers to bulk mailing lists. If someone signs up to such a list - then they may get a welcome - but the Opt Out is required on the bulk mailing.  
  > **username_1**: I have added a para to my answer explaining how your 'welcome' email could link to civicrm/mailing/subscribe  
  > **username_0**: Thanks username_1, can you elaborate on how to "providing a link with a checksum **to civicrm/mailing/subscribe**"?  
  > **username_1**: Added in Answer  
  > **username_0**: Thanks pete, I had read those pages so many times I practically have them memorized!  If by civicrm/mailing/subscribe you just meant send them to an unsubscribe page, I understand that.  I'll document my conclusion in the Answer below.  
  > **username_1**: once it turned out checksum wouldn't work on civicrm/mailing/subscribe?reset=1 i realised you would have to do this by sending them a link with checksum to a Profile instead. hope that was clear enough  
  
  ---
  
  ### Answer by username_0 on 2017-05-24. Score: 0
  
  I believe the final answer is that you cannot insert an action token into an automated message. Looking further into the CAN-Spam Act, which says you don't need to include unsubscribe links in transactional email, I guess strictly speaking we don't need to include this unsubscribe link in the "Welcome" email. Would still be a welcome feature.
  
  
  ---
  
  