The14thGOD Posted February 25, 2007 Share Posted February 25, 2007 Hey, I'm a little confused. I want to be able to send a link in an authentication email so the user can just click on it but it does not work in all emails. I was told I had to somehow tell the email that it was html too. I've located this: Content-Type: multipart/alternative and Content-Type: text/html; charset=iso-8859-1 Do I include that just in the body of my message or do I need to include something else, this is my code: <?php //User Passed Tests, Enter into datbabase $query = "blah blah"; if (mysql_query($query)) { $body = "Thank you $username for making an account at somewhere.com! \n"; $body .= "Please click on the following link in order to activate your account or depending on your email service, you may need to copy and paste the following link into your URL. \n\n"; $body .= "somewhere.com/activate.php?auth_code=$rand_id \n\n"; $body .= "Enjoy. \n"; $body .= "Me"; $body .= "If you recieved this email on accident please ignore it and throw it away. Thank you and sorry for the inconvience."; mail("$email" , "Activation Link for somewhere.com" , $body, "From: me \r\n"); $error = 'added'; header("Location: login.php?error=$error"); exit(0); } ?> Thank you for any help. The14thGOD Link to comment https://forums.phpfreaks.com/topic/40018-mail-texthtml-question/ Share on other sites More sharing options...
The14thGOD Posted February 25, 2007 Author Share Posted February 25, 2007 Anyone? Link to comment https://forums.phpfreaks.com/topic/40018-mail-texthtml-question/#findComment-193901 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.