njdubois Posted November 27, 2011 Share Posted November 27, 2011 sorry, this is kinda annoying to look at but its the best way to show my problem... this : $headers = "From: $email_from\r\n"; $headers .= "Content-type: text/html\r\n"; $email_message ='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' .'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' .'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' .'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' .'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' .'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' .'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' .'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' .'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' .'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' .'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Do you see the '! ' ?? why why why why why why?!?!?! I'm going freaking crazy trying to figure this out!!!! Thanks a billion in advanced! Nick Quote Link to comment https://forums.phpfreaks.com/topic/251892-random-character-showing-up-in-html-email-sent-from-php/ Share on other sites More sharing options...
Pikachu2000 Posted November 27, 2011 Share Posted November 27, 2011 All I can say with any amount of certainty is there's nothing in the code you posted that should insert it. Quote Link to comment https://forums.phpfreaks.com/topic/251892-random-character-showing-up-in-html-email-sent-from-php/#findComment-1291591 Share on other sites More sharing options...
njdubois Posted November 28, 2011 Author Share Posted November 28, 2011 and thus you see my problem! There is no reason why the code above is ending up with that extra character in it. I originally discovered it when an image didn't show up. Took me a while to figure out why. I noticed the url had an unexplained character in it and if I removed the charactrer and pasted the url in a browser problem everything worked great. If I removed that line the character would show up on the next line. it seemed that no matter what I did, the character still appeared about the same distance into the string. I have 3 ideas that could be causing this. A. Somewhere from when I send $email_message to the mail function to when it actually gets emailed its adding the character. I asked my client if any of his old developers might still have access and in an act of vindictive behavior added something to what ever on the server sends emails so that after x characters insert this character. But he was very sure that there was only him and I with access. This leads into B. B. Somewhere in the settings for the server and sending emails there is an error. Do I have to call godaddy? C. Because there is no way to define a variable, somewhere the server is thinking its no longer a normal string, and because of this gives an error when the string reaches a certain length. Does no one have a clue? Not a hint or idea? Something?? Please!! Nick Quote Link to comment https://forums.phpfreaks.com/topic/251892-random-character-showing-up-in-html-email-sent-from-php/#findComment-1291805 Share on other sites More sharing options...
njdubois Posted November 28, 2011 Author Share Posted November 28, 2011 Maybe this will help. These are the URL's for the image tag in the HTML email. The original URL when I first noticed the problem. http://ncaappraisals.com/!+appraisals/nicks/uploaded_files/1322405845-hypo_layout_1.jpg Notice the '!+' ? When I removed the whole line of code that generated that img tag, it just moved to the next one. and I get: http://ncaappraisals.com/a!+ppraisals/nicks/uploaded_files/1322405531-hypo_layout_2.jpg Why did it move up one? Its not replacing a character, its just...there... This is just a random attempt I tried. The actual URL is bad and I know this, I just wanted to see if it moved. http://nicks/uploaded_files/132!+2405545-hypo_layout_1.jpg If I removed X amount of lines of HTML from the string before or after, the character would still appear roughly the same distance in, only it would be as mentioned above when it appeared in something not a URL. It also would repeat if the string was long enough. Again, always the same distance. Again, thanks for reading all this craziness. I really hope I'm getting my problem across clear enough! Nick Quote Link to comment https://forums.phpfreaks.com/topic/251892-random-character-showing-up-in-html-email-sent-from-php/#findComment-1291822 Share on other sites More sharing options...
PFMaBiSmAd Posted November 28, 2011 Share Posted November 28, 2011 I'm guessing you are sending continuous data without any line break of the correct type - message Message to be sent. Each line should be separated with a LF (\n). Lines should not be larger than 70 characters. What operating system are you creating/editing your code on? If your editor is using a \r only as a new line character, you are likely exceeding the length that the mail server will process and it is breaking the line/running up against a bug in it's code. Insure that your message body is using \n for new lines. Quote Link to comment https://forums.phpfreaks.com/topic/251892-random-character-showing-up-in-html-email-sent-from-php/#findComment-1291825 Share on other sites More sharing options...
njdubois Posted November 28, 2011 Author Share Posted November 28, 2011 That did it! [EDIT] Adding "\n" did it! Many many many thanks! Nick Quote Link to comment https://forums.phpfreaks.com/topic/251892-random-character-showing-up-in-html-email-sent-from-php/#findComment-1291833 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.