tags:

views:

807

answers:

2

Hi guys,

I just installed XAMPP, Apache is running, so is MySQL and Mercury.

In Dreamweaver I created a php file with a mail($to,$subject,$msg,'From:'.$email); function, but when I ran the file from localhost it showed an error. After playing around with xampp control panel, turning mercury on and off, it's not showing any errors, yet is not send the email either... any ideas?

the 'admin' button on the cp for mercury does nothing.

Thanks! R

A: 

You have to set your SMTP server settings in the php.ini file

Col. Shrapnel
>>> You have to set your SMTP server settings in the php.ini fileMy not be that smart! :))) what should i set there?
I think your mercury server is the smtp. Still, you need to configure mercury for this to work.
Till
@user you can configure PHP's mail() to use an external SMTP server (if you're on dialup/DSL, this is highly recommended anyway, mails from a local server are likely to get filtered as spam.)
Pekka
+1  A: 

You would have to configure the mercury server bundled with xampp to actually deliver/relay the mails.

But I suggest you use something like SwiftMailer instead of php's mail() function.

edit: there is a third option. The mini-smtp-client built into php/win32 can't do authentication. Therefore you can't simply put SMTP=mail.gmail.com; smtp_port=25 in your php.ini. But you can set sendmail_path and point to an application that can relay the message to another smtp server (including authentication), e.g. fake sendmail.
(But I still suggest swiftmailer)

VolkerK