View previous topic :: View next topic |
Author |
Message |
Premium-mls -
Joined: 27 Jan 2007 Posts: 2
|
Posted: Sat Jan 27, 2007 7:56 am Post subject: Email Form PHP-Problems |
|
|
I have tried several different contact/send mail scripts and different SMTP server combinations and seem to be missing something in the middle here. Open to suggestions as to why when the "submit" button is clicked it is not be picked up by the SMTP Server (PostCast) and mailed to the recipient I have specified in the script. Every script and SMTP Server I try fails.
The Email Server is working;sending and receiving?
Thanks in advance,
By the way Abyss is Absolutely Great!
Thanks,
Mike |
|
Back to top |
|
 |
hc2995 -
Joined: 07 Aug 2006 Posts: 644 Location: Maryland, USA
|
Posted: Sat Jan 27, 2007 8:31 am Post subject: |
|
|
Heres how i send forms:
Code: |
<?php
$to = 'Your email';
$headers = 'from: The e-mail address that this form is from';
$subject = 'Subject of the e-mail';
$body = "Post the contents of the for here(see below)";
mail($to,$subject,$body,$headers);
?>
|
Save the above as what ever (like send-mail.php)
In the body use this to post data from forms:
Code: |
$_POST['NAME_OF_INPUT_FROM_FORM']
|
In the form, put the name of the above file as the action
(As a side note, you can put HTML after the ?> tag) _________________ Where have i been? School got heck-tick, had to move half way around the state, then back... and then i had to change jobs, so iv been away for a while :P |
|
Back to top |
|
 |
Premium-mls -
Joined: 27 Jan 2007 Posts: 2
|
Posted: Sat Jan 27, 2007 9:27 am Post subject: |
|
|
Thanks for the response, i just wanted to respond with the solution that solved my problem.
Change "Host" in php.ini to my server's LAN Name.
In the event someone else is having this problem.
Mike :D |
|
Back to top |
|
 |
|