[SOLVED] mail() problems!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

[SOLVED] mail() problems!

Post by Joe »

I have made a simple mail script in php which works great apart from the fact that instead of displaying the administrators email in the email submission it displays my providors address. I tried this on a couple of other servers and it did the exact same.

My code go's like:

Code: Select all

$email = $_POST['email'];
 $AdminEmail = "webmaster@site.com";
 $EmailSubject = "Thankyou for your submision!";

 $EmailContent = "Your submission is now under review! Thank You...";

 mail($email, $EmailSubject, $EmailContent, $AdminEmail);
Any help appreciated!


Joe 8)
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Try:

Code: Select all

mail($email, $EmailSubject, $EmailContent, "From: $AdminEmail\r\n");
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

Thanks alot mark. Worked perfect. Problem Solved!!!

Joe 8)
Post Reply