Mr P!nk Posted June 28, 2007 Share Posted June 28, 2007 Ive created a mailing list using php3, and i'm trying to make an unsubscribe, so far i have it set up to mail me with the email of the person(s) wishing to unsubscribe, and i have to do it manually. what i want is a code that pulls the email address from te unsubscriber and deletes it from the list. http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <link href="includes/global.css" rel="stylesheet" type="text/css" /> </head> <body class="bodyTextGreen"> <div align="center"> <p> <?php // Compose Mail $myname = "$contact"; $myemail = "$email"; $contactname = ""; $contactemail = ""; //$contactemail = ""; $enquiry = nl2br($enquiry); // Email $message .= "<table><tr><td valign='top'><font color=\"#003366\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\"><b>email : </b></font></td>"; $message .= "<td valign='top'><font color=\"#666666\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">$email | Has Unsubscribed |</font></td></tr>"; // Subject $subject = "*** UNSUBSCRIBE ***"; //Headers $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "From: ".$myname." <".$myemail.">\r\n"; $headers .= "To: ".$contactname." <".$contactemail.">\r\n"; // Send mail mail($contactemail, $subject, $message, $headers); ?> <?php $delete="DELETE FROM $email WHERE <\"data/$List\""; ?> <p>Thank you your data has been removed from our database.</p> <p>Home</p> </div> </body> </html> Thanks in advance Quote Link to comment Share on other sites More sharing options...
Mr P!nk Posted June 28, 2007 Author Share Posted June 28, 2007 also, with out using PHP Mailer , how do i mkae it so i can place images inside the mailout template, whenever i recieve the test email i just get <img src=\"includes/logo copy.jpg\"> ive tried placing a html inside the php but i get error messages. if you'd like to view what ive done http://acmeart.co.uk/lloydtest/mail/admin.php3 also the unsubscribe http://acmeart.co.uk/lloydtest/mail/unsubscribe.php3 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.