Details
Description
We need to be able to include unsubcribe, unsubscribeUrl and optOut and optOutUrl action tokens in the HTML message and have them evaluated properly. Current behaviors are wrong whether you include as links are as straight "text" in the HTML message body:
1. If you include them as straight text, both unsubscribe AND unsubscribeUrl tokens are prefixed with "mailto" (same for optOutUrl). This is incorrect, the *Url tokens should have "http://". Example follows:
===== HTML Message - Tokens NOT Set as LINKS ===========
unsubscribe.1...@FIXME.ORG
(
= correct)
http://localhost/dgg/drupal/civicrm/mailing/unsubscribe?reset=1&jid=&qid=&h=
(
= incorrect)
{action.optOut} = correct)
http://localhost/dgg/drupal/civicrm/mailing/optout?reset=1&jid=&qid=&h=
(
= incorrect)
2. If you include them as LINKS, they are NOT evaluated at all - they come out in the email output as tokens. Example of multi-part mail showing the Text and HTML versions follows (Text version tokens are evaluated, HTML are not):
========= Output Mail ===================================
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Dear Scout
How are things?
To find out about CiviCRM, click here:
http://localhost/dgg/drupal/sites/all/modules/civicrm/extern/url.php?u=12&qid=11.
Do you want to unsubscribe? Click here:
http://localhost/dgg/drupal/civicrm/mailing/unsubscribe?reset=1&jid=8&qid=11&h=ac5d775c3114805d9cc7abe57971dcbe22b3b183
or send mail here:
unsubscribe.1.8.11.ac5d775c3114805d9cc7abe57971dcbe22b3b183@FIXME.ORG
To optout, click here:
http://localhost/dgg/drupal/civicrm/mailing/optout?reset=1&jid=8&qid=11&h=ac5d775c3114805d9cc7abe57971dcbe22b3b183
--=_87e595f18b7c168b7cdb544c76116332
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit
Dear Scout<br>How are things?<br><br>To find out about CiviCRM, click <a href="http://localhost/dgg/drupal/sites/all/modules/civicrm/extern/url.php?u=11&qid=11" target="_blank">here</a>:<br><br>Do you want to unsubscribe? Click <a href="%7Baction.unsubscribeUrl%7D">here</a>:<br>Or send mail to <a href="%7Baction.unsubscribe%7D">this address</a><br><br><br>To optout, click <a href="%7Baction.optOutUrl%7D">here</a>:<br><br>Our address is:<br>NW 284Z States Pl E<br />Receiving<br />Lavallette, NJ 08735<br />United States<br> <br>
<img src="http://localhost/dgg/drupal/sites/all/modules/civicrm/extern/open.php?q=11" width='1' height='1' alt='' border='0'>