Hey what's up, I'm hoping someone could explain to me a few
things about how PHP is handling this, and why:
My boss wanted a webpage that lets him type a newsletter into a textbox (Similar in every style and way to how hotmail, yahoo, and all those other html based email programs work) and then press send, and it will query the database and send the newsletter to all of our customers.
I created it to do everything, however the mass mail program is set to only mail our test database filled with some emails of our employees(until this works smoothly).
Now that i've covered the background, here is what isn't working:
The idea was the boss creates a webpage, and then simply pastes the html code from the webpage into the textbox. Then it just should send to the users using the mail function.
I have the form action to be directed to a the PHP page, and that php page is responsible for looking at the form data set, and taking the textbox with the html code. (passed in the POST)
If i just normally enter any old text, devoid of html code, it works find, and sends the text to our employees..But if i paste html code in there, it simply ignores it and only prints out the plain text. I've went ahead and read the forums, and I am properly setting the header to text/html and whatnot. Anyone have any idea why it wouldn't work? Is something wrong with the fact i'm passing the html code over from the html page to the php page using POST?
The one thing I do know is that if, instead of passing the html over, I simply go directly to the PHP page itself, and in the mail function, assign a variable $msg = my html code, it works fine and the email sends. That is unacceptable, however, as my boss can't open the php file and edit the string everytime he wants to send an email. This has to be done from another page remotely, and passed in using get or post.
So why would my html code send from the php file, however if i'm passing it from the webpage to the php it doesn't work? I suspect something involving string manipulation is involved.
A cookie to whoever has any idea.. (not the internet cookies, either)=p
Thanks!
😕