Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mail() in html with clickable links

Status
Not open for further replies.

QuietFire

Programmer
Feb 25, 2003
12
US
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("&nbsp;","",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("&nbsp;","",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
 
DISREGARD!!! I see my error. was using a script someone handed me for the project... just saw the striptags and solved it anyway.

THANKS ANYWAY. CODERS should sleep at least 3 hours a night!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top