Hello, I have started php learning for a week and I've been blocked just at the begining. I have installed the latest version of Wamp on my windows, installed outlook express (it works properly with my gmail adress), modified the mail function in the php.ini ("SMTP", etc), restarted many times the program and pc, but still can't send an email with the information gathered from a simple form I have made. When I click the submit button on the down bar of the page you see the "waiting for localhost..." notice, but it lasts so long and at last there comes the famous errror message: Warning: mail() [function.mail]: Failed to connect to mailserver at "smtp.gmail.com" port 465, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\my first php\form_response.php on line 34 Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\my first php\form_response.php on line 39 I am getting sick... here is the code: <?php $_POST['name_first']; $_POST['email']; $_POST['rate']; $_POST['comments']; $first_name= $_POST['name_first']; $email= $_POST['email']; $rate= $_POST['rate']; $comments= $_POST['comments']; print "Thank you $first_name!"; $email_message= "First name: $first_name Email: $email Rate: $rate Comments: $comments"; ini_set("sendmail_from","myname@gmail.com"); ini_set("SMTP","smtp.gmail.com"); mail('myname@gmail.com','Form Response',$email_message); ?>
I never tried that, but I think that you have a problem on your mail server: - You have to set some paramaters on your gmail account to be able to use gmail servers from outsite you email account ...
Here are some links for you : http://mail.google.com/support/bin/answer.py?hl=en&ctx=mail&answer=12103 http://mail.google.com/support/bin/answer.py?hl=en&ctx=mail&answer=75726
just download XAMPP similar like WAMP. To test local email, run mercury mail (which comes with it) which is mail server. Next download, Pegasus as email client and then login using admin@localhost account.
I guess that you entered your gmail password while setting up servers on outlook! (setting up or setupping !!!... lol)
Thank you very much for your suggestion, I'm going to try it, but can I have WAMP and XAMP together on my windows? I mean if installing XAMP while WAMP has just been installed would cause any problem.
As SMTP is outgoing, have you checked to make sure that the authentication settings are correct for gmail in OE ? Just a thought !
Thank you for the thought. Well, I have followed the gmail guide for configuration of OE. Don't know what else should be done for the authentication settings.
Thank you very much for taking the time to help me. Unfortunately I have never worked with linux, and I don't know anything about it. I have changed the last code as you'd suggested, the only thing that has changes is the time it took for the error message to appear has increased to almost 5 minutes! I want to install XAMPP as was suggested to use the mercury mail, maybe it solves the problem, but I wanted to get sure if it's harmless to install it while WAMP has already been installed on my windows. I don't have much information on this area, am just a very beginner! Thanks again.
Hi I'm a new member and beginner in php, too. I have a form in html sth like this: <form id="form1" name="eggrafi" method="post" action="signup.php"> <label> <input type="text" name="name" id="textfield" /> </label> <label> <input name="password" type="password" id="textfield2" value="" /> </label> <label> <input type="submit" name="submit" id="button" value="ΕγγÏαφή" /> </label> </form> the user press the submit button and the signup.php opens. in case someone do not write sth in the field "name" of the form i have the php code: if($_POST["name"]==NULL) { include("arxeio.html"); } At last in file arxeio.html i have sth like this: <label> <input type="text" name="name" id="textfield" /> </label> <input name="password" type="password" id="textfield2" value="<?php echo $_POST["password"]; ?>" /> I do that because someone who give the password but not the username will have the opportunity to file arxeio.html to give only username and not the password again. it works fine BUT if someone go to view->page source of the file arxeio.html he can see the password. My question is how i can hide the password?
is there any problem ,generally, with that? if in the page source the password appears? it appears only in this page... (arxeio.html)
omerta - it's best to start your own threads rather than hijack someone else's. That way no one gets confused Brew
i thought it would be better to write in an opening thread. look how much threads are open!!!!!!!!!!!!! sorry anyway