signature16 Posted November 3, 2007 Share Posted November 3, 2007 I have setup WAMP server on my computer and I want the server to use an external mail server (my webhosts). My computer is running Vista and the mail server I want to use it running Linux. I can't figure it out from the PHP docs. Can somebody point me in the right direction? Quote Link to comment Share on other sites More sharing options...
Daukan Posted November 3, 2007 Share Posted November 3, 2007 You need to edit the php.ini file Find the line for SMTP and sendmail_from Fill out both SMTP = mail.yourdomain.net sendmail_from = youremail@yourdomain.com Quote Link to comment Share on other sites More sharing options...
signature16 Posted November 3, 2007 Author Share Posted November 3, 2007 what about my username and password? Quote Link to comment Share on other sites More sharing options...
Daukan Posted November 3, 2007 Share Posted November 3, 2007 Shouldn't need them for outgoing mail Quote Link to comment Share on other sites More sharing options...
signature16 Posted November 3, 2007 Author Share Posted November 3, 2007 Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\Contact Form\contact.php on line 28 This is what is in my php.ini and i restarted apache [mail function] ; For Win32 only. SMTP = mail.mydomain.com ; For Win32 only. sendmail_from = website@mydomain.com Quote Link to comment Share on other sites More sharing options...
Daukan Posted November 3, 2007 Share Posted November 3, 2007 SMTP = mail.domain.com That is not correct. Do you know your SMTP settings for your mail server? It should have the domain name not just domain I have optonline for a service provider. This is what my SMTP looks like; SMTP = mail.optonline.com Quote Link to comment Share on other sites More sharing options...
signature16 Posted November 3, 2007 Author Share Posted November 3, 2007 ya.... i put my domain in there, but it still doesn't work. i just removed it for privacy. Quote Link to comment Share on other sites More sharing options...
Daukan Posted November 3, 2007 Share Posted November 3, 2007 Most ISP's block outgoing port 80 to prevent spamming. If you are sending from your home computer you will need to your ISP's SMTP server. I have the same problem can't use the hosted server I pay for on my home computer. Quote Link to comment Share on other sites More sharing options...
Daukan Posted November 3, 2007 Share Posted November 3, 2007 Oops I meant port 25, but they do block outgoing port 80 usually so you can't run a server. Quote Link to comment 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.