Mail() on windows server incorrectly configured?

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
Skittlewidth
Forum Contributor
Posts: 389
Joined: Wed Nov 06, 2002 9:18 am
Location: Kent, UK

Mail() on windows server incorrectly configured?

Post by Skittlewidth »

I've no knowledge of server administration really but is there any reason why mail() would not work on a windows server? Does it have to be configured differently to a Linux server?

According to the manual it does work slightly differently, but thats as much as I understand. I only ask cos my boss noticed an ancient contact form is not working somewhere, and the simplest test script with mail() doesn't send anything, but will on another server (which unfortunately is linux so its not a fair test).

Running phpinfo reveals that sendmail_path is not set in the PHP core on the windows server.

is that what's causing problems? no error comes up and mail() returns true.
User avatar
Skittlewidth
Forum Contributor
Posts: 389
Joined: Wed Nov 06, 2002 9:18 am
Location: Kent, UK

Post by Skittlewidth »

ah no worries, it was the 'sendmail_from' setting that had been changed by Fasthosts and now has to be explicitly overridden with ini_set().

As usual, thanks for telling us, Fasthosts :evil:
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Skittlewidth wrote:As usual, thanks for telling us, Fasthosts :evil:
You could always use something that doesn't rely on the server configuration like PHPMailer or Swift Mailer (signature).
Post Reply