PDA

View Full Version : Question regarding PHP email



Digitalosophy
November 13th, 2003, 05:55 PM
Ok here's the deal. I did a site for a gaming clan, their web host isn't too good. Actually it stinks, but it comes with their game server account.

Anyway on the contact page there is a php email form. Everything works fine but....

When I recieve the email the from add is: me@localhost.

Now, I can't register an email account with them because i can't get in touch with them. I'm guessing that is the problem? The fact that I'm using an external email account in the php?

Thanks

Digitalosophy
November 17th, 2003, 02:53 PM
lol help someone, please :)

λ
November 17th, 2003, 03:01 PM
for the header parameter of the mail() function, use "From: Digitalosophy <digital@gamingclan.net>"

:)

Digitalosophy
November 17th, 2003, 03:28 PM
Originally posted by njs12345
for the header parameter of the mail() function, use "From: Digitalosophy <digital@gamingclan.net>"


:)

Hey man thanks for the reply, sorry but i'm really not very good at php. Does this look ok to you?

I'm really not sure if i screwed up the header or not, im not sure what order the parameters are supposed to go.


<?
http://www.digitalosophy.com

$name = $_GET['name'];
$email = $_GET['email'];
$clan = $_GET['clan'];
$website = $_GET['website'];
$comments = $_GET['comments'];

$Email = "sosick@digitalosophy.com";
$Subject = "SOD Contact Info";
$Header = "emailtoshow.com";
$Message = "$name, $email, $clan, $website, $comments";


print "Thank you ". $name . ", your order has been placed";


mail($Header,$Email,$Subject,$Message);
?>



Thanks again

λ
November 17th, 2003, 03:56 PM
mail($Email, $Subject, $Message, $Header);

Also, you'd want $Header to equal "From: emailtoshow.com". It should work then.

And it's alright, you're more of an ASP guy ;)

Digitalosophy
November 17th, 2003, 05:22 PM
lol thanks bro :)