lhcpr Posted June 20, 2008 Share Posted June 20, 2008 Hello there, First time post and absolute newbie to php... I am building a website that will have a mail php form function for a particular field. Is there anyway that I can test the mail-to function locally before I post on webserver? I just want to be sure that the field can actually be sent to the nominated email address. I am using both Windows and Ubuntu OS. Thanks Graham Quote Link to comment https://forums.phpfreaks.com/topic/111082-testing-php-code-before-posting-on-web-server/ Share on other sites More sharing options...
dmccabe Posted June 20, 2008 Share Posted June 20, 2008 You could install WAMP http://www.en.wampserver.com/ locally and test it on your local machine, just make sure your web server and local WAMP server are setup correctly. alternatively you could always have to different files on your webserver, and run one as a test. Quote Link to comment https://forums.phpfreaks.com/topic/111082-testing-php-code-before-posting-on-web-server/#findComment-570014 Share on other sites More sharing options...
Orio Posted June 20, 2008 Share Posted June 20, 2008 I'd upload it to a folder with an obscure name, htaccess it so only you can access it (user/pass) and then test it there. I think it's better doing that rather than testing it locally because this way you are testing it with all of your server's settings, so there will be no surprises when you move it for live use. Orio. Quote Link to comment https://forums.phpfreaks.com/topic/111082-testing-php-code-before-posting-on-web-server/#findComment-570020 Share on other sites More sharing options...
abdfahim Posted June 20, 2008 Share Posted June 20, 2008 You could install WAMP http://www.en.wampserver.com/ locally and test it on your local machine, just make sure your web server and local WAMP server are setup correctly. alternatively you could always have to different files on your webserver, and run one as a test. but I have one question. WAMP is a composite package with Apache,Mysql,PHP on it. Is it possible to use php mail function with this three without any POP/SMTP server? Quote Link to comment https://forums.phpfreaks.com/topic/111082-testing-php-code-before-posting-on-web-server/#findComment-570022 Share on other sites More sharing options...
wildteen88 Posted June 20, 2008 Share Posted June 20, 2008 Yes. PHP can be configured to use a remote SMTP server for sending emails. You do not need to install an SMTP server locally. Quote Link to comment https://forums.phpfreaks.com/topic/111082-testing-php-code-before-posting-on-web-server/#findComment-570395 Share on other sites More sharing options...
lhcpr Posted June 21, 2008 Author Share Posted June 21, 2008 Hello all - thank you for your assistance. Orio, what you say makes plenty of sense. I may try that. Like I say, I am not that knowledgeable about php so I may have to hit you up for some help again. BTW, I am using phpFormGenerator to generate my form and php code, but need to alter the php code somewhat before use. Perhaps best to post the code before hand for review? Thanks Graham Quote Link to comment https://forums.phpfreaks.com/topic/111082-testing-php-code-before-posting-on-web-server/#findComment-570677 Share on other sites More sharing options...
Orio Posted June 21, 2008 Share Posted June 21, 2008 Sure, go for it. Orio. Quote Link to comment https://forums.phpfreaks.com/topic/111082-testing-php-code-before-posting-on-web-server/#findComment-570828 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.