Forum Moderators: coopster

Message Too Old, No Replies

Creating HTML newsletter, but unsubscribe link not clickable

html email, unsubscribe link

         

php4U

6:10 am on Mar 2, 2008 (gmt 0)

10+ Year Member



I have integrated an HTML editor into a CMS system for a client to be able to send HTML emails...

$header = "Content-Type: text/html; charset=iso-8859-1\n";

I tested with creating links within the editor, and they show in the email and are clickable...however the unsubscribe link show below in bold isn't clickable.
=====================
$header = "Content-Type: text/html; charset=iso-8859-1\n";
$header .= "From: " . $site_name . "<" . $admin_email . ">\n";
$header .= "\n";

while (list($full_name,$email) = mysql_fetch_row($result))
{
$msg = "<html>;
$msg .= "<head>";
$msg .= "Dear " . stripslashes(str_replace('_', ' ', $full_name)) . ",<br><br>\r\n\r\n";
$msg .= $_POST['clienteditor'];
$msg .="<br><br>----- *** Notice *** -----<br><br>\r\n\r\n";
$msg .= "If you don't wish to receive our newsletter anymore, please click the link below for safe and permanent unsubscription.<br><br>\r\n\r\n";
$msg .= "$websiteUrl/massemail/confirm.php?action=remove&email=$email";
$msg .= "</html>";

mail($email, stripslashes($_POST['subject']). " - " . date("l \\t\h\e jS"), stripslashes($msg), $header);
=====================

I have tried many things and haven't had any luck. I think becuase I stared at code to integrate the editor now I am probably overlooking something simple. HTML email can get hairy, but they insist on sending them because they want to edit it like "word" and send emails to their customers. Thank you for any suggestions.

jatar_k

1:54 pm on Mar 2, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



for html you need <a> tags to link something

php4U

1:38 am on Mar 3, 2008 (gmt 0)

10+ Year Member



Thank you jatar_k,

Like I mentioned...probably overlooking something simple, and that is what it was!