Hi all,
not sure if this is the right area for this but here goes.
I'm trying to setup php on a server so the website's contact form can be used by web visitors. I have tried a whole bunch of stuff on the web all to no avail.
Thanks.
R
Hi all,
not sure if this is the right area for this but here goes.
I'm trying to setup php on a server so the website's contact form can be used by web visitors. I have tried a whole bunch of stuff on the web all to no avail.
Thanks.
R
Have you got any code to show us of stuff you've tried so far?
Mailing is normally pretty simple.
Just put that on a test page somewhere and upload it to your site, change the $to variable to your email address and see if you receive an email. If you do then reply to this and tell us what more you need.PHP Code:$to = 'randomuser@hotmail.com';
$subject = 'News';
$message = 'Here\'s some mail';
$headers = 'From: myname@mysite.com';
mail($to, $subject, $message, $headers);
Are you trying to set up php on the server itself or are you looking for a code snippet that will send email using php that is already installed on a server. If the latter, see the post above; however, if you are trying to install php, please post what OS you are using as well as the current setup (web server, database, etc.)
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design
Well php has been installed on the server but basically we are not able to receive any mail. I have uploaded php codes like the one posted by Schmoopy (thanks Schmoopy) but we did not receive any mail. I am assuming that there is something not quite working properly on the server.
We've tried the following test script
http://www.surfcelive.com/try.phpPHP Code:<?php
if(mail('info@website.com','test subject','test message')){
echo('ok');
}
else{
echo('not ok');
}
?>
It comes up with not ok.
Its a windows 2003 server, with MySQL, php, perl installed on it.
Thanks.
Last edited by Snookerman; 05-02-2009 at 10:51 AM. Reason: added [php] tags
Maybe try contacting your host to see what they have to say, there's no code I can give you to fix the problem and the people who will know your server best will be the people who own it.
http://www.000webhost.com/forum/7306-post51.html
I am used to being able to use the contact php in a webhost - but right now I am using this free hosting acct and it does not give you an option to enable email php - so I had to do php script. This was a post I found and it works great. However, you may edit it to your needs. Hope this is what you were looking for:
Bookmarks