Jump to content

Cannot send email


SunTzu
 Share

Recommended Posts

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...