Iām so sorry that I missed your question. Yes, I was able to come up with a workable solution. Itās not the prettiest but itās been working well. If I ever get the time to clean it up I would like to make the custom unsubscribe page address editable in the GUI. For now hereās what I did:
(I know this works with Suite CRM version 7.10.19.)
1.) Modify ā\modules\EmailMan\EmailMan.phpā and change the following line to a custom landing page (I thinks itās around line 1070).
//$removeme_url_template = $this->tracking_url . 'index.php?entryPoint=removeme&identifier=' . $this->getTargetId();
$removeme_url_template = $this->tracking_url . 'unsubscribe.php?identifier=' . $this->getTargetId();
I believe this should really be saved to: \custom\modules\EmailMan\EmailMan.php" to make it upgrade safe. I think youāll also need to do a quick repair as well. My custom unsubscribe page is located in the root of the crm folder but it could be anywhere. The custom unsubscribe page uses the passed in querystring āidentifierā to create the real unsubscribe link. The unsubscribe button on the custom unsubscribe page is disabled by default and gets enabled only when the checkbox is selected which prevents spam engines from inadvertently unsubscribing the email address.
Hereās a generalized version of our unsubscribe page (I removed our site specific text and links. Please excuse the quick and dirty html/css):
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1">
<TITLE>Unsubscribe</TITLE>
<style type="text/css">
<!--
.style2 {font-size: 13px; font-family:Open Sans, HelveticaNeue, Helvetica Neue, Helvetica, Arial, sans-serif;}
.style3 {font-size: 36px; font-family: "Open Sans", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif;}
-->
</style>
<script type="text/javascript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_changeProp(objId,x,theProp,theValue) { //v9.0
var obj = null; with (document){ if (getElementById)
obj = getElementById(objId); }
if (obj){
if (theValue == true || theValue == false)
eval("obj.style."+theProp+"="+theValue);
else eval("obj.style."+theProp+"='"+theValue+"'");
}
}
//-->
</script>
</HEAD>
<BODY BGCOLOR="#ffffff">
<p> </p>
<div style="width:440px; margin: 0 auto; border:solid;">
<div style="width:90%; margin: 0 auto; margin:20px;">
<h1 class="style2"><span class="style3">UNSUBSCRIBE</span>
</h1>
<p><span class="style2">To unsubscribe, please tick the box below and click SUBMIT.</span></p>
<form name="form1" method="post" action="">
<p class="style2"><input name="unsubscribe" type="checkbox" onchange="document.getElementById('submit_button').disabled = !this.checked;" />
Unsubscribe me</p>
<label>
<input name="submit" type="submit" disabled id="submit_button" style="font-family:Open Sans, HelveticaNeue, Helvetica Neue, Helvetica, Arial, sans-serif; font-weight: 500; outline: none; font-size: 13px; width: auto; border-radius: 2px; box-shadow: inset 0px -1px 0px 0px rgba(0,0,0, 0.2); padding: 9px 11px; border: none !important; background: #8a4e9f; cursor: pointer; margin: 0;" onClick="MM_goToURL('parent','https://<YOURCRMURLHERE>/index.php?entryPoint=removeme&identifier=<?php echo $_GET['identifier'] ?>');return document.MM_returnValue" value="SUBMIT">
</label>
</form>
</div></div>
</BODY>
</HTML>
To use this you just create an email campaign template with the default āOpt-out Link?ā checked. Load a test target in your campaign and click āSend Testā to verify itās working.
I just remembered that I also edited the CampaignTracker.php file as well but I donāt think that was really needed. I would need to verify it but if it was needed here is the modified line around line 179:
//$this->message_url .= '/index.php?entryPoint=removeme&identifier={MESSAGE_ID}';
$this->message_url .= '/unsubscribe.php?identifier={MESSAGE_ID}';
Let me know if you run into any trouble and if the second file needed to be modified and Iāll edit this post accordingly.