foxxx428 wrote:Hi, I'm new here. I've been using easyphp for about half a year now and switched over to xampp yesterday and I can't find one thing bad about this software. I do still have one problem that xampp didn't fix. I run an IPB Board instead of phpBB but the problem would be exactly the same for either. No matter what I do, I can't get the mail function to work at all. For example, when you register here, you get an e-mail that you have to click a link to activate your account. IPB works the same and I need for it to work. I have access to various different e-mail server softwares if that's what I need to do. Is there an easy way to do this? If not, can anyone explain the hard way? Any help would be much appreciated.
Getting email to work in Windows PHP is always a pain in the ass. The Windows version of PHP
must use the SMTP email settings, rather than Sendmail, because Sendmail is not readily available for Windows (without paying a chunk of money). I
think that Xampp defaults to configuring PHP for SMTP, but you need to set the MAIL FROM address in php.ini. This is in (assuming you used the default install path)
c:\apachefriends\xampp\apache\bin\php.ini
A little over half-way down is a section called [mail function]. It should look like this:
; For Win32 only.
SMTP = localhost
; For Win32 only.
sendmail_from =
admin@whatever.com
The SMTP value is the address of the mail server you wish to send through. You can use a fully qualified domain name (mail.whatever.com) or an IP address.
The sendmail_from address is the address used in the MAIL FROM stage when PHP connects to an outgoing mail server to send email. If it's not set right, mail might be rejected by the security settings on the mail server.
If you have to use SMTP AUTH to send email through the server you want to use, you cannot use the PHP email fuctions directly, as they are not supported. But you can use Mercury, which comes with xampp, as a relay agent. PHP sends email to Mercury on the local machine, and Mercury sends it on to whatever mail server you want.
Depending on the scripting you are using, it may have seperate settings for sending email that override php.ini, as well. PHPbb does, I believe, for instance. Double check your settings there, as well, and make certain it is set to use SMTP rather than Sendmail.
Once you're sure all the settings are correct, if it still doesn't work, post the error you get.
[/b]