brandt Posted July 24, 2008 Share Posted July 24, 2008 I have an e-mail script setup which outputs links depending on what options someone selects from a web form. Lately, I have been seeing junk output coming from my variable. For instance, one of the links that is outputted displays in the e-mail as: http://files.myd!%0a+omain.com/pdf/document1.pdf It is inserting the !%0a+ from somewhere and I cannot figure out where. I have a form where people can select multiple checkboxes to select files they want: $msg =($_POST['item1'])?"<a href=\"".$path2pdf."document1.pdf\">Download 1 here</a><br>":""; $msg .=($_POST['item2'])?"<a href=\"".$path2pdf."document2.pdf\">Download 2 here</a><br>":""; and so on... $path2pdf is simply set to http://files.mydomain.com/ I have tested it via an echo and it outputs the message perfectly fine. The error only appears in the email itself. I have tested this with a variety of e-mail clients. What could be causing this? Thank you in advance. Quote Link to comment Share on other sites More sharing options...
MFHJoe Posted July 24, 2008 Share Posted July 24, 2008 Are you sending any headers with the mail? If so, what are they? If they're wrong they can sometimes make weird things happen. It seems strange that it was working and now it's not though... Do you know if anything has been changed on your server? Quote Link to comment Share on other sites More sharing options...
brandt Posted July 24, 2008 Author Share Posted July 24, 2008 I am not sure about things changing on our server. My header is as follows: $headers = "From: $recipient\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; mail($to, $subject, $msg, $headers); Quote Link to comment Share on other sites More sharing options...
brandt Posted July 29, 2008 Author Share Posted July 29, 2008 Has anyone encountered this before? It is bewildering and I cannot figure out why this is happening. Any insight would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
brandt Posted July 29, 2008 Author Share Posted July 29, 2008 I managed to grab access to another server and the script works flawlessly... What could be causing this on the server? This problem has only started appearing a few weeks ago. 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.