Ok, I did this php email tutorial exactly like this dude said.
The email thing looks good and says “Your message has been sent” but it doesnt work.
Here is the tutorial
Now that I think about it, your PHP file may show an error because when you enter the PHP file, you’re not defining any vars, which makes PHP unable to send a mail. I can’t see any errors in the PHP file, but try replacing it with this:
Nope, didnt work either.
Man, this sucks. Maybe i need to do this.
Since all the mail arguments (except for the $to variable) are passed by another page (Flash in this case) we need to add the if statement at the beginning in order to check if they are all defined.
So, if one of those HTTP_POST_VARS variales is empty, don’t run the mail code and return an error message: output=error
Otherwise, if all those variables exist and they’re not empty, we define our mail paramenters paying atention to these lines:
We do that because if user input this text: “I’m the one” (example) and we dont’ use the stripslashes function, we will receive an email with this text: “I’m the one”. In fact stripslashes returns a string with backslashes stripped off.
Then we add this headers to our email:
From defines the mail sender, Reply-To (not necessary here) is necessary when the reply recipient is different from the sender email. (When you press the ‘reply’ button on your mail reader, the email is sent, if defined, to the Reply-To address).
Header finishes with the X-Mail (The php page itself and the php running version) and the X-Priority of the mail (1 is urgent, 3 is normal)