ivytony Posted July 3, 2008 Share Posted July 3, 2008 I'm developing and testing my PHP application on my personal laptop with internet connection. Sometimes, I need my application to send email, e.g. email for activation a user's registration. I wonder how to enable the Apache server on my local machine to send email to outside like gmail or hotmail. thanks! Quote Link to comment https://forums.phpfreaks.com/topic/113153-how-to-enable-apache-on-my-local-machine-send-email/ Share on other sites More sharing options...
trq Posted July 3, 2008 Share Posted July 3, 2008 Apache has nothing to do with email, it is a http server. You will need to install an smtp server or use one provided by your isp. Quote Link to comment https://forums.phpfreaks.com/topic/113153-how-to-enable-apache-on-my-local-machine-send-email/#findComment-581342 Share on other sites More sharing options...
ivytony Posted July 3, 2008 Author Share Posted July 3, 2008 thanks for reply. Can you recommend a free SMTP server, compatible with windows Vista? Quote Link to comment https://forums.phpfreaks.com/topic/113153-how-to-enable-apache-on-my-local-machine-send-email/#findComment-581353 Share on other sites More sharing options...
trq Posted July 4, 2008 Share Posted July 4, 2008 Sorry, haven't used windows in years. Quote Link to comment https://forums.phpfreaks.com/topic/113153-how-to-enable-apache-on-my-local-machine-send-email/#findComment-581462 Share on other sites More sharing options...
wildteen88 Posted July 5, 2008 Share Posted July 5, 2008 I'm developing and testing my PHP application on my personal laptop with internet connection. Sometimes, I need my application to send email, e.g. email for activation a user's registration. I wonder how to enable the Apache server on my local machine to send email to outside like gmail or hotmail. thanks! You don't need to install an SMTP mail server locally to send emails. Just configure PHP to point to an existing SMTP mail server. To do this open your php.ini and locate the following lines: [mail function] ; For Win32 only. SMTP = localhost smtp_port = 25 ; For Win32 only. ;sendmail_from = me@example.com Change localhost to your ISP's mail server address, eg smtp.your_isp.com Leave the smtp_port as-is (change it if your ISP uses a different port). Next remove the semi-colon ( ; ) from in front of the sendmail_from line and change me@example.com to the email address provided by your ISP. Save the php.ini and restart Apache. Test to see if the changes worked by running a simple mail script. Quote Link to comment https://forums.phpfreaks.com/topic/113153-how-to-enable-apache-on-my-local-machine-send-email/#findComment-582164 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.