PHP, PEAR forms. Help

Winchester

Diamond Member
Jan 21, 2003
4,965
0
0
I am just trying to get my forms to email to myself, I do not want the "mailto" function. I have been trying for weeks working on a php script and then I get this from the server admin.

"If the sendmail isn't working, try using the PHP PEAR Mail extension...Since the
webserver isn't out mail server, many sites block out mail coming from sendmail, but the
Mail extension works great.

Help Page

Here is n example of how to use this extension. If you have any troubles let me now.

"
Here is the form I am trying to submit. Form Page


I do not understand this AT ALL. I just flat out dont know what to do with it. I have my forms made out, but that is as far as I know what to do with it. Any help would be nice.

 

Drakkon

Diamond Member
Aug 14, 2001
8,401
1
0
does the mailto function not work for you for some reason? i've found that is about the best one to use to send emails via php but *shrug*
if u cant use that and must use this PEAR function(which ahs the EXACT same functionality of mailto btw) what youd do is take the little snippest of code...
paste it into a php page...
make your forms action post to that page...
change the vars in that help snippt to reflect vars for your email/server/etc...
change the body to reflect how you want your mail formatted...
upload and your pretty close to there...there may be some debugging but if ur admin says pear mail will work then i guess u gotta go with it...
 

Winchester

Diamond Member
Jan 21, 2003
4,965
0
0
Ok, I got it to where I click submit and it sends an email. It is blank ("test message"), but hey at least I am getting an email.

How do I configure my forms to respond to this script so that every entry shows up as its own entity?


Business
Name
Address
etc.
 

Drakkon

Diamond Member
Aug 14, 2001
8,401
1
0
set soemthing like

$body = "$business /n $name /n $address /n $etc" and then email yourself the body variable...will create your message for you by passing the vars...
 

Winchester

Diamond Member
Jan 21, 2003
4,965
0
0
I cant find anything that discusses what I am needing. I added the stuff that Drakkon said but it did nothing.

What do I need to modify my current form setup for it to submit the entered data? I do not care about people not entering all of the data.

 

Drakkon

Diamond Member
Aug 14, 2001
8,401
1
0
pm me with or post your code...with things edited out of course...and i can probobly figure out whats going wrong...