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. Link to comment https://forums.phpfreaks.com/topic/116427-problem-with-e-mail-output/ 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? Link to comment https://forums.phpfreaks.com/topic/116427-problem-with-e-mail-output/#findComment-598753 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); Link to comment https://forums.phpfreaks.com/topic/116427-problem-with-e-mail-output/#findComment-598932 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. Link to comment https://forums.phpfreaks.com/topic/116427-problem-with-e-mail-output/#findComment-603024 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. Link to comment https://forums.phpfreaks.com/topic/116427-problem-with-e-mail-output/#findComment-603026 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.