Windows PHP Sendmail [solved]

Solutions for other advanced phplisters

Windows PHP Sendmail [solved]

Postby isac99 » 8:45pm, Sat 12 Dec, 2009

I hope this saves someone many hours of work. I am running PHP Version 5.2.5 (x64) on a Windows 2003 64 bit server with Apache 2.0. When sending a test mail from PHPList everything worked fine. When users tried to subscribe to a list I was always getting this error:
Code: Select all
Mailer Error: Could not instantiate mail function

The Reason
If you look at your logs in an SMTP server you will see the following entry - [MACHINENAME] [12/Dec/2009:20:47:45 +0100] "MAIL -? FROM:<name <>> SMTP" 501 27

The from address
<iain <>>
is incorrectly formatted to be sent by the built in Windows SMTP server. Not sure if other SMTP servers will accept this.

The Solution
The problem lies in the configuration of PHP. Change the following code in php.ini (found in your PHP installation folder):
Code: Select all

Give Apache a quick restart and hey presto it all works. The log from the SMTP server should look something like this...
Code: Select all - [MACHINENAME] [12/Dec/2009:21:14:25 +0100] "MAIL -? FROM:<> SMTP" 250 48
phpList newbie
Posts: 1
Joined: 8:22pm, Sat 12 Dec, 2009

Return to Advanced Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 1 guest