Simply trying to put a remove me link in a news letter. The remove me line does not contain the link.
I have a variable with the string for the link:
$remove=" \n \n Click <a href='removeme.php?email='" . $recipient . "'>Here</a> to unsubscribe.";
Then I have the function:
function sendmessage()
{
global $recipient;
global $remove;
global $sub;
global $mess;
$subject=str_replace(" ","",stripslashes(strip_tags($sub)));
$msg="--xxx\n";
$msg.="Content-Type:text/html\n\n";
$msg.=nl2br(stripslashes(strip_tags($mess)));
$msg.=nl2br(stripslashes(strip_tags($remove)));
$msg.=(stripslashes(strip_tags("<br><br><br>--------This message sent courtesy of xxx.")));
//plain-text part
$msg.="\n\n--xxx\n";
$msg.="Content-Type:text/plain\n\n";
$Tmsg=str_replace(" ","",stripslashes(strip_tags($mess)));
$msg.=str_replace("\n\n","\n",$Tmsg);
$msg.="\n\n\n--------This message sent courtesy of xxx.\n";
$msg.="\n\n--xxx--\n";
// $message="";
//headers
$mailheaders = "Errors-To: webmaster@xxx.com\n";
$mailheaders .= "From: xxx@xxx.com \n";
$mailheaders .= "Reply-To: administrator@xxx.com\n";
$mailheaders .= "X-Priority: 3 \n";
$mailheaders .= "X-MSMail-Priority: High \n";
$mailheaders .= "X-Mailer: DrHedberg.com\n";
$mailheaders .= "Content-type: multipart/mixed; boundary=\"xxx\";\n"; //AOL-safe HTML
// $mailheaders .= "Content-type: multipart/mixed; boundary=\"xxx\";\n"; //AOL-safe HTML
$t=mail($recipient,$sub,$msg,$mailheaders);
}
?>
Thanks in advance
I have a variable with the string for the link:
$remove=" \n \n Click <a href='removeme.php?email='" . $recipient . "'>Here</a> to unsubscribe.";
Then I have the function:
function sendmessage()
{
global $recipient;
global $remove;
global $sub;
global $mess;
$subject=str_replace(" ","",stripslashes(strip_tags($sub)));
$msg="--xxx\n";
$msg.="Content-Type:text/html\n\n";
$msg.=nl2br(stripslashes(strip_tags($mess)));
$msg.=nl2br(stripslashes(strip_tags($remove)));
$msg.=(stripslashes(strip_tags("<br><br><br>--------This message sent courtesy of xxx.")));
//plain-text part
$msg.="\n\n--xxx\n";
$msg.="Content-Type:text/plain\n\n";
$Tmsg=str_replace(" ","",stripslashes(strip_tags($mess)));
$msg.=str_replace("\n\n","\n",$Tmsg);
$msg.="\n\n\n--------This message sent courtesy of xxx.\n";
$msg.="\n\n--xxx--\n";
// $message="";
//headers
$mailheaders = "Errors-To: webmaster@xxx.com\n";
$mailheaders .= "From: xxx@xxx.com \n";
$mailheaders .= "Reply-To: administrator@xxx.com\n";
$mailheaders .= "X-Priority: 3 \n";
$mailheaders .= "X-MSMail-Priority: High \n";
$mailheaders .= "X-Mailer: DrHedberg.com\n";
$mailheaders .= "Content-type: multipart/mixed; boundary=\"xxx\";\n"; //AOL-safe HTML
// $mailheaders .= "Content-type: multipart/mixed; boundary=\"xxx\";\n"; //AOL-safe HTML
$t=mail($recipient,$sub,$msg,$mailheaders);
}
?>
Thanks in advance