[nycphp-talk] using PHP mail function on Windows server?
Tim Lieberman
tim_lists at o2group.com
Wed Apr 23 22:27:45 EDT 2008
mail() used to work fine on windows (under IIS, anyway) last time I had
to deal with it (years ago).
My suggestion:
- Get an SMTP server hostname at your hosting provider
- Use a better mail-sending system, like swiftmailer:
http://www.swiftmailer.org/ (I think you can still get a reasonably
up-to-date version that will work w. php4)
- Send mail by having PHP talk directly to a dedicated SMTP box.
This is almost always the right answer.
-Tim
Kristina Anderson wrote:
> Thanks David,
>
> I found the following...is it worth trying to modify the ini file or
> should I start trying to use the Zend mail function and/or Outlook?
>
> //==
>
> Runtime Configuration
>
> The behavior of the mail functions is affected by settings in the
> php.ini file.
>
>
> Mail configuration options:
>
> Name Default Description Changeable
> SMTP "localhost" Windows only: The DNS name or IP address of the SMTP
> server PHP_INI_ALL
> smtp_port "25" Windows only: The SMTP port number. Available since PHP
> 4.3 PHP_INI_ALL
> sendmail_from NULL Windows only: Specifies the "from" address to be
> used in email sent from PHP PHP_INI_ALL
>
> //==
>
> BTW the client's environment is a hosted server and I will investigate
> the options available if we determine that this turkey won't fly as
> configured. I wasn't anticipating having to install anything and not
> sure whether that is an option.
>
> --Kristina
>
>
>
>> Kristina Anderson wrote:
>>
>>> Hi everyone --
>>>
>>> My current client's app is a PHP 4 site running on a Windows box
>>>
> (don't
>
>>> ask...I have no idea why).
>>>
>> Because it is a stable setup and typically outperforms a LAMPP stack.
>>
> I use
>
>> this since day one and even before my PHP time for both development
>>
> and
>
>> production use.
>>
>>
>>> I'm trying to use the mail() function and
>>> the mail isn't cooperating.
>>>
>>> (Two things that I noticed in phpinfo() are that Internal Sendmail
>>> Support for Windows is enabled and the Zend engine is installed.
>>>
>> I never got the mail() function to work right on Windows. There are
>>
> tools
>
>> around. I did try once the Unix Utilities from Luckasoft (get them
>>
> here:
>
>> http://luckasoft.com/download/UUtils_setup.exe). It is a freeware
>>
> package for
>
>> Windows that mimics sendmail. It has a GUI configuration program and
>>
> accepts
>
>> the same shell command format as known from Unix. But since this is a
>>
> client's
>
>> box installing extra stuff is probably the least desireable approach.
>>
>>
>>> So maybe I could/should be using another method to send the mails,
>>>
> or
>
>>> there is a trick that I'm not aware of that I need to use to get
>>>
> this
>
>>> to work?)
>>>
>> Well, there are other means. You may even google for the CLI of
>>
> Outlook
>
>> assuming it is setup and configured right.
>>
>>
>>> It's not necessarily super high volume but we will be sending a
>>> significant amount of automated emails to registered people on the
>>>
> site.
>
>>> Thanks for any help...
>>>
>> Well, I guess once it works volume becomes a concern only when you
>>
> send a lot
>
>> of messages.
>>
>> Sorry, I'm not excessively useful here.
>>
>> David
>> _______________________________________________
>> New York PHP Community Talk Mailing List
>> http://lists.nyphp.org/mailman/listinfo/talk
>>
>> NYPHPCon 2006 Presentations Online
>> http://www.nyphpcon.com
>>
>> Show Your Participation in New York PHP
>> http://www.nyphp.org/show_participation.php
>>
>>
>>
>
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>
>
More information about the talk
mailing list