Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Windows (Apache2/PHP/5.2.6/MySQL5.1.30)

I see. So the preferred solution is to route anyone who wishes to use SMTP with bbPress, and is not happy with the default PHP behaviour, to use the SMTP plugin. Fair enough.

There is another solution for Windows SMTP systems for those who control PHP; live with setting ‘sendmail_from’ server-wide in php.ini. This overrides the value passed to the mail() function ‘From:’ header argument for use with the SMTP ‘MAIL FROM:’ command (where the problem lies), but retains that value for use with the mail message body ‘From:’ header (where a complete textual name may be used).

BTW, the reason that the (SMTP) MTA on Windows rejects the email address is not due to the MTA, but due to PHP on Windows:

http://www.php.net/manual/en/function.mail.php

A long-standing discussion is here:

http://bugs.php.net/bug.php?id=28038

The current value for the PHP mail() function ‘From:’ header (“User name” <uname@domain.com>”) is an RFC2822 compliant format suitable for parsing by a library (like PHP mail()) which *should* generate separate strings for SMTP (the ‘MAIL FROM:’ command, which must be RFC2821 compliant) and the message body (the ‘From:’ header field which can be RFC2822 compliant). RFC2821 format (user@domain.com or <user@domain.com>) differs from RFC2822 format. PHP mail() on Windows does not do this translation.

Skip to toolbar