Hey guys

I'm new to this so here goes ......

I run a forum (phpBB3) and am now trying to get an contact us section on the home page.

I have no real PHP knowledge and am trying to get my head round how it all works.

Can I use the existing sendmail function in the contact us page and just construct the email I want to send using a form or will I have to write a new php page for send mail?

I have looked over loads of site and they all seem to give me this ....
"mail("$to", "$subject", "$email", "$message");"

Does this code simply bring up the users email program (i.e. Outlook) and load the mail into that? This is not the disired effect, I want it to send an email directly. I have a hsot that supports this so it should be possible.

I was going to use this kind of thing ...
<form name="emai" action="submit.php">

But couldn't find the original php code.

Can anyone point me in the right direction?

I have looked over loads of site and they all seem to give me this ....
"mail("$to", "$subject", "$email", "$message");"

Does this code simply bring up the users email program (i.e. Outlook) and load the mail into that?

No. It will send an e-mail directly. Try this simple code:

<? 
$header = "From: Myself <myself@billgates.com>\r\n";

mail("your@email.com", "testmail", "this is the contents", $header);
?>

I did not try it, but it should send you an email if you change "your@email.com" to your own email adress.

Regards Niek

Mistake, please delete post.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.