I am sending mail using php mail function with a subject like 'my subject' but it doesn't work until I replace the space like 'my_subject" Does anyone know why that would be?
I have sent with spaces before so I know it works but in this case it wont The above only works if I take the spaces out of the subject......I don't get it
Remove the headers and try to send plain text mail. See if that works. The charset you specified may be causing the problem.
Have you tried making the subject in HTML? For example, use for the spaces? If that works, take a look at the htmlentities function http://php.net/manual/en/function.htmlentities.php
I finally got it to work. The problem was I was putting in \n and ' in the the body of the message . Somehow and I don't know why but if there were spaces in the subject with those in the body it would not work. I have since moved to using the phpmailer class.
I think you should try using single quote instead of double quote in most of the cases it doesnt require something special to add space between the variable values