My first post - help with Email

Reply

Join Date: Nov 2007
Posts: 1
Reputation: fox_racing is an unknown quantity at this point 
Solved Threads: 0
fox_racing fox_racing is offline Offline
Newbie Poster

My first post - help with Email

 
0
  #1
Nov 20th, 2007
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?
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 2,841
Reputation: niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute 
Solved Threads: 298
Moderator
Featured Poster
niek_e's Avatar
niek_e niek_e is offline Offline
Roasting Maven

Re: My first post - help with Email

 
0
  #2
Nov 21st, 2007
Originally Posted by fox_racing View Post
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:

  1. <?
  2. $header = "From: Myself <myself@billgates.com>\r\n";
  3.  
  4. mail("your@email.com", "testmail", "this is the contents", $header);
  5. ?>
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
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 142
Reputation: MitkOK is an unknown quantity at this point 
Solved Threads: 12
MitkOK's Avatar
MitkOK MitkOK is offline Offline
Junior Poster

Re: My first post - help with Email

 
0
  #3
Nov 21st, 2007
Mistake, please delete post.
Last edited by MitkOK; Nov 21st, 2007 at 8:21 am.
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 437
Reputation: Fungus1487 is on a distinguished road 
Solved Threads: 50
Fungus1487's Avatar
Fungus1487 Fungus1487 is offline Offline
Posting Pro in Training

Re: My first post - help with Email

 
0
  #4
Nov 21st, 2007
When Autumn Falls [ http://www.whenautumnfalls.co.uk ] &&
Designdotworks [ http://www.designdotworks.co.uk ] Web / Graphic / Software Design
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC