micksheff wrote:Hi
Iam using xampp to test scripts before uploading to my hosts server. Some of my scripts require user login/activation by sending mail.
How could I use/setup xampp to sendmail, I get error messages everytime I try?
BTW they are PHP scripts I'm using.
PHP's normal method of sending email is through Sendmail, which is a *nix program that isn't part of the normal Windows system. The Windows version of Sendmail will send out through a standard email server, if it's set to. If you check in the xampp folder, you'll find a folder called apache, and one in that called bin. That seems to be the default install location for php.ini, which has your PHP settings. In php.ini, you'll find, somewhere in the middle, the following section:
[mail function]
; For Win32 only.
SMTP = localhost
; For Win32 only.
sendmail_from = postmaster@localhost
If your ISP allows you to send email through their server without any kind of user name or password, you can change "localhost" to their smtp server, and the sendmail_from to whatever address you want that email to be from.
If your ISP requires some kind of authentication on their smtp server, you will have to jump through a few more hoops. Xampp comes with Mercury (though it might be better to download the latest version directly from the author at
www.pmail.com), which can send directly, or relay through your ISP's mail server with a user name and password.
Try setting the SMTP setting to your ISP's mail server, and see if it works. If it doesn't, let me know and I'll try to walk you through setting up Mercury correctly. (It wouldn't hurt to call your ISP and ask them if they block outgoing port 25 - it will save you some time figuring out why stuff won't go if they do.)