otuatail Posted July 6, 2015 Share Posted July 6, 2015 $msg = "Test msg "; $RemoveMsg = "Extra info "; $RemoveMsgTag = "< a href='http://site2.desmond-otoole.co.uk/CustomerRemove.php'>Remove me</a>"; $msg .= "\r\n\r\n$RemoveMsg $RemoveMsgTag\r\n"; $success = mail($emailList,$subject, $msg, $headers, '-froot@desmond-otoole.co.uk'); // must comply with » RFC 2822. Hi I want to send out a mailing list with a link at the bottom for anyone wishing to be removed. I can't get the link working. Quote Link to comment Share on other sites More sharing options...
otuatail Posted July 6, 2015 Author Share Posted July 6, 2015 $name="postmaster"; $site ="millersyard"; $webemail = $site . "@desmond-otoole.co.uk"; $headers = "From: $name <$webemail>\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $RemoveMsgTag = "< a href='http://site2.desmond-otoole.co.uk/CustomerRemove.php'>Remove me</a>"; $msg .= "\r\n\r\n$RemoveMsg $RemoveMsgTag\r\n"; $success = mail($emailList,$subject, $msg, $headers, '-froot@desmond-otoole.co.uk'); // must comply with » RFC 2822. I have tried turning it into a html email using code found on internet. Quote Link to comment Share on other sites More sharing options...
ColumFerry Posted July 6, 2015 Share Posted July 6, 2015 After changing it to html, is the link still not working? Also, could it be the email provider you are using is blocking external links? Quote Link to comment Share on other sites More sharing options...
scootstah Posted July 6, 2015 Share Posted July 6, 2015 What mail client are you viewing it with? Most of the time HTML will be disabled by default, and you have to explicitly allow HTML in the email. Quote Link to comment Share on other sites More sharing options...
CroNiX Posted July 6, 2015 Share Posted July 6, 2015 Using plain text email, I just put the raw link (no anchor tag) on it's own line starting with http://. MOST email clients will automatically change anything that starts with http:// into a clickable link. Try just using: http://site2.desmond-otoole.co.uk/CustomerRemove.php Quote Link to comment Share on other sites More sharing options...
otuatail Posted July 8, 2015 Author Share Posted July 8, 2015 Hi thanks for this. It works if I make it into a complete html text <html><body><a></a></body></html> Just <a></a> doesn't work. Thanks. 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.