Answers.Body: <p>Most of the code for the actual unsubscribe process is located here:</p>
  
  <p>CRM/Mailing/Form/Unsubscribe.php</p>
  
  <p>Would be good to:</p>
  
  <p>a. Create a site wide CiviMail setting so an admin can disable the email confirmation process.</p>
  
  <p>b. Use this site wide setting to determine the behavior of the code, the new behavior or the 4.4 and prior behavior. The 4.4 code is here:</p>
  
  <p>CRM/Mailing/Page/Unsubscribe.php</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-13T19:40:58.623Z
Answers.LastActivityDate: 2015-05-13T19:40:58.623Z
Answers.UserDisplayName: Donald Lobo
Answers.Body: <p><em>Caveat: This simple hack works fine when a user is unsubscribing from one or more regular groups.  It has no effect when there is a smart group in the mix.</em></p>
  
  <p>Avoiding the confusing re-display of the confirmation dialog turned out to be pretty easy.  Around line 129-130 in "public function postProcess()" in CRM/Mailing/Form/Unsubscribe.php add this code:</p>
  
  <pre><code>$groupExist = NULL;
  </code></pre>
  
  <p>Put it just before this line:</p>
  
  <pre><code>CRM_Core_Session::setStatus($statusMsg, '', 'success');
  </code></pre>
  
  <p>With this fix, when the user correctly enters their email address and clicks "Unsubscribe" they get a confirmation message only.</p>
  
  <p>I may be missing something more complex here, but I'm thinking the absence of this single line in the original code may have just been an oversight.</p>
  
  <p>Avoiding the whole email address entry confirmation is also straightforward, and involves removing (or skipping over) a few lines of code in the same php file and the templates/CRM/Mailing/Form/Unsubscribe.tpl template file.</p>
  
  <p>The best solution is to control this behavior with a system-wide option, as Donald Lobo suggests.  More study needed on my part.</p>
  
  <p>Addendum: I also suggest that the text "Please Confirm your" be removed from the page title heading (also set in CRM/Mailing/Form/Unsubscribe.php) so that it simplified to "Unsubscribe from Mailing/Group".  This still works for the confirmation request phase and makes more sense in the context of a "You have been unsubscribed" confirmation. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-13T18:20:46.573Z
Answers.Text: I muddied the water with this previous answer. Putting aside the issue of suppressing the email verification process altogether (thanks @donald-lobo), there remains a bug that shows when the contact is trying to unsubscribe via web page from a mailing sent to a **smart group**. In such cases the contact is presented with the entire verification page over and over, even after correctly submitting a valid email address.  The "successfully unsubscribed" message is easy to miss when being asked (apparently) to verify again. Unsubscribing from a static group is much cleaner by comparison.
Answers.UserDisplayName: charlie
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-14T18:54:38.857Z
Answers.LastActivityDate: 2015-05-15T21:24:10.367Z
Answers.LastEditDate: 2015-05-15T21:24:10.367Z
Answers.UserDisplayName: charlie
Body: <p>This is picking up on a <a href="http://forum.civicrm.org/index.php/topic,35416" rel="nofollow">topic from the old forum</a> having to do with unsubscribe confirmation.  (This feature is present in CiviCRM 4.6.2 as well as 4.5.8.)  I agree that having to enter one's email address is an additional annoyance to someone who is probably already annoyed.  </p>
  
  <p>What happens next in the process is also confusing.  Once the unsubscribing user enters their email address and clicks "unsubscribe" a highlighted confirmation message appears near the top of the screen, but the original highlighted "are you sure?" message and confirmation entry form still appear just below, as if the user is being asked to confirm again.  As a workaround, I'm using only {action.unsubscribe} and avoiding {action.unsubscribeURL}.</p>
  
  <p>I understand that at present there is no way to override the "enter your email address to confirm" process.  But is there any way to show the now-confirmed user a simple "you've been removed" message without repeating the original confirmation template contents?  Perhaps a second template displayed at the end of the process?</p>
  
  <p>If someone could give me a hint about where to start looking in the code, I'd be willing to have a go at displaying a simple post-confirmation message and submitting a patch.</p>
  
Tags: <civimail>
Title: Confusing CiviMail unsubscription confirmation screen
ThreadText: # Confusing CiviMail unsubscription confirmation screen
  
  (Asked by: username_0 on 2015-05-13)
  
  This is picking up on a [topic from the old forum](http://forum.civicrm.org/index.php/topic,35416) having to do with unsubscribe confirmation. (This feature is present in CiviCRM 4.6.2 as well as 4.5.8.) I agree that having to enter one's email address is an additional annoyance to someone who is probably already annoyed.
  
  What happens next in the process is also confusing. Once the unsubscribing user enters their email address and clicks "unsubscribe" a highlighted confirmation message appears near the top of the screen, but the original highlighted "are you sure?" message and confirmation entry form still appear just below, as if the user is being asked to confirm again. As a workaround, I'm using only {action.unsubscribe} and avoiding {action.unsubscribeURL}.
  
  I understand that at present there is no way to override the "enter your email address to confirm" process. But is there any way to show the now-confirmed user a simple "you've been removed" message without repeating the original confirmation template contents? Perhaps a second template displayed at the end of the process?
  
  If someone could give me a hint about where to start looking in the code, I'd be willing to have a go at displaying a simple post-confirmation message and submitting a patch.
  
  **Tags:** civimail
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2015-05-13. Score: 2
  
  Most of the code for the actual unsubscribe process is located here:
  
  CRM/Mailing/Form/Unsubscribe.php
  
  Would be good to:
  
  a. Create a site wide CiviMail setting so an admin can disable the email confirmation process.
  
  b. Use this site wide setting to determine the behavior of the code, the new behavior or the 4.4 and prior behavior. The 4.4 code is here:
  
  CRM/Mailing/Page/Unsubscribe.php
  
  
  ---
  
  ### Answer by username_0 on 2015-05-14. Score: 1
  
  *Caveat: This simple hack works fine when a user is unsubscribing from one or more regular groups. It has no effect when there is a smart group in the mix.*
  
  Avoiding the confusing re-display of the confirmation dialog turned out to be pretty easy. Around line 129-130 in "public function postProcess()" in CRM/Mailing/Form/Unsubscribe.php add this code:
  
  ```
  $groupExist = NULL;
  
  ```
  
  Put it just before this line:
  
  ```
  CRM_Core_Session::setStatus($statusMsg, '', 'success');
  
  ```
  
  With this fix, when the user correctly enters their email address and clicks "Unsubscribe" they get a confirmation message only.
  
  I may be missing something more complex here, but I'm thinking the absence of this single line in the original code may have just been an oversight.
  
  Avoiding the whole email address entry confirmation is also straightforward, and involves removing (or skipping over) a few lines of code in the same php file and the templates/CRM/Mailing/Form/Unsubscribe.tpl template file.
  
  The best solution is to control this behavior with a system-wide option, as username_1 suggests. More study needed on my part.
  
  Addendum: I also suggest that the text "Please Confirm your" be removed from the page title heading (also set in CRM/Mailing/Form/Unsubscribe.php) so that it simplified to "Unsubscribe from Mailing/Group". This still works for the confirmation request phase and makes more sense in the context of a "You have been unsubscribed" confirmation.
  
  > **Comments:**
  > **username_0**: I muddied the water with this previous answer. Putting aside the issue of suppressing the email verification process altogether (thanks @username_1-username_1), there remains a bug that shows when the contact is trying to unsubscribe via web page from a mailing sent to a **smart group**. In such cases the contact is presented with the entire verification page over and over, even after correctly submitting a valid email address.  The "successfully unsubscribed" message is easy to miss when being asked (apparently) to verify again. Unsubscribing from a static group is much cleaner by comparison.  
  
  ---
  
  