SunTzu Posted January 4, 2007 Share Posted January 4, 2007 Hi,I am using the following simple codes for creating a form with a textarea <form method="post" action="sendmail.php"> Email: <input name="email" type="text" /><br /> Message:<br /> <textarea name="message" rows="15" cols="40"> </textarea><br /> <input type="submit" /></form> and sending its contents to myaddress using the following php script <?php $email = $_REQUEST['email']; $message = $_REQUEST['message']; mail( "myaddress@something.com", "Feedback Form Results", $message, "From: $email" ); header( "Location: http://www.example.com/thankyou.html" );?> but it does not work ...Any help plsss ... Link to comment Share on other sites More sharing options...
Anders Moen Posted January 4, 2007 Share Posted January 4, 2007 Hmm, are you sure your host allows PHP?And is the mail() function on? Ask your host. Give me link to your host and I can find out if you don't do it yourself. Link to comment Share on other sites More sharing options...
SunTzu Posted January 4, 2007 Author Share Posted January 4, 2007 Hmm, are you sure your host allows PHP?And is the mail() function on? Ask your host. Give me link to your host and I can find out if you don't do it yourself.Thnx for your reply ..So, how can i set the mail() function on ? I have just modify SMTP parameter in the php.ini file. I am using gmail so i put SMTP = smtp.gmail.comAlthough, my ISP is this one http://www.tellas.gr/index.asp?gid=28〈=1What is most important here ... the ISP or Gmail ? Link to comment Share on other sites More sharing options...
SunTzu Posted January 5, 2007 Author Share Posted January 5, 2007 I think that my problem is about setting up an SMTP server in Apache.Any idea of how doing this ? Link to comment Share on other sites More sharing options...
SunTzu Posted January 5, 2007 Author Share Posted January 5, 2007 Can i use Gmail as mail server ? Link to comment Share on other sites More sharing options...
pulpfiction Posted January 5, 2007 Share Posted January 5, 2007 Not sure if this will solve your problem, but guess this link might help you... something change needed in php.ini file..http://www.thescripts.com/forum/thread3970.html Link to comment Share on other sites More sharing options...
justsomeguy Posted January 8, 2007 Share Posted January 8, 2007 I don't think you can use Gmail as your smtp server. Some ISP also block port 25 (outgoing mail) so that you can't send mail using any server other then the ISP server. Try to find out from your ISP if they have a mail server for you to use or if they have the port open. If the port is open, then you will probably need to install your own mail server. Look into the sendmail program. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now